Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][locker] Disable search keyboard suggestions

aman-pilot2f02b5d790b4
diff --git a/mobile/apps/locker/lib/ui/pages/home_page.dart b/mobile/apps/locker/lib/ui/pages/home_page.dart
index 927ee10520..e78d11091f 100644
--- a/mobile/apps/locker/lib/ui/pages/home_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/home_page.dart
@@ -134,6 +134,7 @@ class CustomLockerAppBar extends StatelessWidget
hintText: context.l10n.searchHint,
onChanged: onSearchChanged,
autocorrect: false,
+ enableSuggestions: false,
shouldUnfocusOnClearOrSubmit: true,
backgroundColor: colors.specialWhite,
textColor: Colors.black,
diff --git a/mobile/packages/ente_components/lib/components/text_input_component.dart b/mobile/packages/ente_components/lib/components/text_input_component.dart
index 5db7444942..a9b4c88925 100644
--- a/mobile/packages/ente_components/lib/components/text_input_component.dart
+++ b/mobile/packages/ente_components/lib/components/text_input_component.dart
@@ -47,6 +47,7 @@ class TextInputComponent extends StatefulWidget {
this.backgroundColor,
this.textColor,
this.autocorrect = true,
+ this.enableSuggestions = true,
this.isRequired = false,
this.prefix,
this.suffix,
@@ -93,6 +94,7 @@ class TextInputComponent extends StatefulWidget {
final Color? backgroundColor;
final Color? textColor;
final bool autocorrect;
+ final bool enableSuggestions;
final bool isRequired;
/// Caller-owned leading widget. Pass explicit color and size when needed.
@@ -291,7 +293,9 @@ class _TextInputComponentState extends State<TextInputComponent> {
: const []),
autocorrect:
widget.autocorrect && !widget.isPasswordInput,
- enableSuggestions: !widget.isPasswordInput,
+ enableSuggestions:
+ widget.enableSuggestions &&
+ !widget.isPasswordInput,
textAlignVertical: _isMultiline
? TextAlignVertical.top
: TextAlignVertical.center,