Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Livinglist committed Jun 2, 2024
1 parent 6fc980d commit aba9d70
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/blocs/stories/stories_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ class StoriesBloc extends Bloc<StoriesEvent, StoriesState> {
storiesToBeDownloaded: state.storiesToBeDownloaded,
),
);
for (final StoryType type in StoryType.values) {

for (final StoryType type in _preferenceCubit.state.tabs) {
add(LoadStories(type: type));
}
}
Expand Down Expand Up @@ -144,13 +145,9 @@ class StoriesBloc extends Bloc<StoriesEvent, StoriesState> {
final Map<StoryType, List<Story>> newStoriesMap =
Map<StoryType, List<Story>>.from(state.storiesByType);
newStoriesMap[type] = <Story>[];
final Map<StoryType, List<int>> newStoryIdsMap =
Map<StoryType, List<int>>.from(state.storyIdsByType);
newStoryIdsMap[type] = <int>[];
emit(
state.copyWith(
storiesByType: newStoriesMap,
storyIdsByType: newStoryIdsMap,
),
);
}
Expand Down

0 comments on commit aba9d70

Please sign in to comment.