File tree Expand file tree Collapse file tree 7 files changed +21
-23
lines changed
Expand file tree Collapse file tree 7 files changed +21
-23
lines changed Original file line number Diff line number Diff line change 4646 <!-- Don't delete the meta-data below.
4747 This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
4848 <meta-data android : name =" flutterEmbedding" android : value =" 2" />
49+ <meta-data android : name =" flutter_deeplinking_enabled" android : value =" false" />
4950
5051 <meta-data android : name =" io.sentry.dsn"
5152 android : value =
" https://[email protected] /9" />
Original file line number Diff line number Diff line change 6363 <string >Main </string >
6464 <key >UIStatusBarHidden </key >
6565 <false />
66+ <key >FlutterDeepLinkingEnabled </key >
67+ <false />
6668 <key >UISupportedInterfaceOrientations </key >
6769 <array >
6870 <string >UIInterfaceOrientationPortrait </string >
Original file line number Diff line number Diff line change @@ -64,22 +64,6 @@ class CodeStore {
6464 return true ;
6565 }
6666
67- Future <void > updateCodeIndex (Code code) async {
68- final key = code.generatedID! ;
69-
70- _cacheCodes.remove (key);
71- int deletedIndex = code.display.position;
72-
73- _cacheCodes.forEach ((key, c) async {
74- if (c.display.position > deletedIndex) {
75- Code updatedCode = c.copyWith (
76- display: c.display.copyWith (position: c.display.position - 1 ),
77- );
78- await addCode (updatedCode);
79- }
80- });
81- }
82-
8367 Future <List <Code >> getAllCodes ({
8468 AccountMode ? accountMode,
8569 bool sortCodes = true ,
@@ -179,7 +163,6 @@ class CodeStore {
179163 Future <void > removeCode (Code code, {AccountMode ? accountMode}) async {
180164 final mode = accountMode ?? _authenticatorService.getAccountMode ();
181165 await _authenticatorService.deleteEntry (code.generatedID! , mode);
182- await updateCodeIndex (code);
183166 Bus .instance.fire (CodesUpdatedEvent ());
184167 }
185168
Original file line number Diff line number Diff line change @@ -645,7 +645,12 @@ class _CodeWidgetState extends State<CodeWidget> {
645645 firstButtonLabel: l10n.delete,
646646 isCritical: true ,
647647 firstButtonOnTap: () async {
648- await CodeStore .instance.removeCode (widget.code);
648+ try {
649+ await CodeStore .instance.removeCode (widget.code);
650+ } catch (e,s) {
651+ logger.severe ('Failed to delete code' ,e,s);
652+ showGenericErrorDialog (context: context, error: e).ignore ();
653+ }
649654 },
650655 );
651656 }
Original file line number Diff line number Diff line change @@ -667,16 +667,24 @@ class _HomePageState extends State<HomePage> {
667667 }
668668 return false ;
669669 }
670-
670+ int lastScanTime = DateTime . now ().millisecondsSinceEpoch - 1000 ;
671671 void _handleDeeplink (BuildContext context, String ? link) {
672- if (! Configuration .instance.hasConfiguredAccount () || link == null ) {
672+ bool isAccountConfigured = Configuration .instance.hasConfiguredAccount ();
673+ bool isOfflineModeEnabled = Configuration .instance.hasOptedForOfflineMode () &&
674+ Configuration .instance.getOfflineSecretKey () != null ;
675+ if (! (isAccountConfigured || isOfflineModeEnabled) || link == null ) {
676+ return ;
677+ }
678+ if (DateTime .now ().millisecondsSinceEpoch - lastScanTime < 1000 ) {
679+ _logger.info ("Ignoring potential event for same deeplink" );
673680 return ;
674681 }
682+ lastScanTime = DateTime .now ().millisecondsSinceEpoch;
675683 if (mounted && link.toLowerCase ().startsWith ("otpauth://" )) {
676684 try {
677685 final newCode = Code .fromOTPAuthUrl (link);
678686 getNextTotp (newCode);
679- CodeStore .instance.addCode (newCode);
687+ CodeStore .instance.addCode (newCode, shouldSync : false );
680688 _focusNewCode (newCode);
681689 } catch (e, s) {
682690 showGenericErrorDialog (
Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ class LockScreenSettings {
9090 : await PrivacyScreen .instance.enable (
9191 iosOptions: const PrivacyIosOptions (
9292 enablePrivacy: true ,
93- privacyImageName: 'LaunchImage' ,
9493 ),
9594 androidOptions: const PrivacyAndroidOptions (
9695 enableSecure: true ,
Original file line number Diff line number Diff line change 11
22name : ente_auth
33description : ente two-factor authenticator
4- version : 4.3.0+430
4+ version : 4.3.1+431
55publish_to : none
66
77environment :
You can’t perform that action at this time.
0 commit comments