Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

close button behavior

laurenspriem014177e9a937
diff --git a/mobile/apps/photos/lib/ui/viewer/search/search_widget.dart b/mobile/apps/photos/lib/ui/viewer/search/search_widget.dart
index ef5f22cd73..9af726ccc3 100644
--- a/mobile/apps/photos/lib/ui/viewer/search/search_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/search/search_widget.dart
@@ -143,8 +143,9 @@ class SearchWidgetState extends State<SearchWidget> {
final textTheme = getEnteTextTheme(context);
final mutedTextColor =
textTheme.smallMuted.color ?? colorScheme.strokeMuted;
- final shouldShowClearButton =
- focusNode.hasFocus || MediaQuery.viewInsetsOf(context).bottom > 0;
+ final shouldShowClearButton = focusNode.hasFocus ||
+ MediaQuery.viewInsetsOf(context).bottom > 0 ||
+ textController.text.trim().isNotEmpty;
return RepaintBoundary(
key: widgetKey,
child: Padding(