π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fire ClearAndUnfocusSearchBar instead of findingAncestorStateObject with textController and focusNode to clear and unfocus search bar
ashilkn8f0ab0d59711
diff --git a/lib/ui/viewer/search/search_suffix_icon_widget.dart b/lib/ui/viewer/search/search_suffix_icon_widget.dartindex c8f034fb19..f5d36f4997 100644--- a/lib/ui/viewer/search/search_suffix_icon_widget.dart+++ b/lib/ui/viewer/search/search_suffix_icon_widget.dart@@ -1,6 +1,7 @@import 'package:flutter/material.dart';+import "package:photos/core/event_bus.dart";+import "package:photos/events/clear_and_unfocus_search_bar_event.dart";import "package:photos/theme/ente_theme.dart";-import 'package:photos/ui/viewer/search/search_widget.dart';class SearchSuffixIcon extends StatefulWidget {final bool shouldShowSpinner;@@ -35,10 +36,7 @@ class _SearchSuffixIconState extends State<SearchSuffixIcon>splashRadius: 1,visualDensity: const VisualDensity(horizontal: -1, vertical: -1),onPressed: () {- final searchWidgetState =- context.findAncestorStateOfType<SearchWidgetState>()!;- searchWidgetState.textController.clear();- searchWidgetState.focusNode.unfocus();+ Bus.instance.fire(ClearAndUnfocusSearchBar());},icon: Icon(Icons.close,