Skip to content

armgit / ente

Public Imported from GitHub
0

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

Delay apply code focus

Neeraj Gupta6599f95fe421
diff --git a/mobile/apps/photos/lib/ui/growth/apply_code_sheet.dart b/mobile/apps/photos/lib/ui/growth/apply_code_sheet.dart
index 4f0463e152..ca2947f7c8 100644
--- a/mobile/apps/photos/lib/ui/growth/apply_code_sheet.dart
+++ b/mobile/apps/photos/lib/ui/growth/apply_code_sheet.dart
@@ -52,9 +52,11 @@ class _ApplyCodeContentState extends State<_ApplyCodeContent> {
_codeFocusNode = FocusNode();
_controller.addListener(_onTextChanged);
WidgetsBinding.instance.addPostFrameCallback((_) {
- if (mounted) {
- _codeFocusNode.requestFocus();
- }
+ Future.delayed(const Duration(milliseconds: 150), () {
+ if (mounted) {
+ _codeFocusNode.requestFocus();
+ }
+ });
});
}