Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Fix listener/controller lifecycle leaks and review follow-ups (#9101)

Neeraj7f458948dad1
diff --cc mobile/apps/photos/lib/emergency/recover_others_account.dart
index 7229919d84,21cbfb5070..2c96acf070
--- a/mobile/apps/photos/lib/emergency/recover_others_account.dart
+++ b/mobile/apps/photos/lib/emergency/recover_others_account.dart
@@@ -66,14 -66,31 +66,23 @@@ class _RecoverOthersAccountState extend
});
}
+ @override
+ void dispose() {
+ _passwordController1.dispose();
+ _passwordController2.dispose();
+ _password1FocusNode.dispose();
+ _password2FocusNode.dispose();
+ super.dispose();
+ }
+
@override
Widget build(BuildContext context) {
- final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 100;
-
- FloatingActionButtonLocation? fabLocation() {
- if (isKeypadOpen) {
- return null;
- } else {
- return FloatingActionButtonLocation.centerFloat;
- }
- }
-
String title = AppLocalizations.of(context).setPasswordTitle;
title = AppLocalizations.of(context).resetPasswordTitle;
+ final isFormValid = _passwordsMatch && _isPasswordValid;
+
return Scaffold(
- resizeToAvoidBottomInset: isKeypadOpen,
+ resizeToAvoidBottomInset: true,
appBar: AppBar(
leading: IconButton(
icon: const Icon(Icons.arrow_back),