Skip to content

Commit

Permalink
remove comment. (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
Livinglist authored Jun 5, 2024
1 parent ab43d1a commit bade5b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
21 changes: 11 additions & 10 deletions lib/blocs/stories/stories_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:math';
import 'package:bloc/bloc.dart';
import 'package:bloc_concurrency/bloc_concurrency.dart';
import 'package:equatable/equatable.dart';
import 'package:hacki/config/constants.dart';
import 'package:hacki/config/locator.dart';
import 'package:hacki/cubits/cubits.dart';
import 'package:hacki/models/models.dart';
Expand Down Expand Up @@ -75,18 +76,18 @@ class StoriesBloc extends Bloc<StoriesEvent, StoriesState> {
) async {
_preferenceSubscription ??= _preferenceCubit.stream
.distinct((PreferenceState previous, PreferenceState next) {
return previous.isComplexStoryTileEnabled ==
next.isComplexStoryTileEnabled;
})
//.debounceTime(AppDurations.twoSeconds)
return previous.isComplexStoryTileEnabled ==
next.isComplexStoryTileEnabled;
})
.debounceTime(AppDurations.oneSecond)
.listen((PreferenceState event) {
final bool isComplexTile = event.isComplexStoryTileEnabled;
final int pageSize = getPageSize(isComplexTile: isComplexTile);
final bool isComplexTile = event.isComplexStoryTileEnabled;
final int pageSize = getPageSize(isComplexTile: isComplexTile);

if (pageSize != state.currentPageSize) {
add(StoriesPageSizeChanged(pageSize: pageSize));
}
});
if (pageSize != state.currentPageSize) {
add(StoriesPageSizeChanged(pageSize: pageSize));
}
});
final bool isComplexTile = _preferenceCubit.state.isComplexStoryTileEnabled;
final int pageSize = getPageSize(isComplexTile: isComplexTile);
emit(
Expand Down
4 changes: 3 additions & 1 deletion lib/screens/search/search_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ class _SearchScreenState extends State<SearchScreen> with ItemActionMixin {
void dispose() {
refreshController.dispose();
scrollController.dispose();
focusNode.dispose();
focusNode
..unfocus()
..dispose();
textEditingController.dispose();
super.dispose();
}
Expand Down

0 comments on commit bade5b4

Please sign in to comment.