π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Lint fixes
Neeraj Guptac5c77ab70687
diff --git a/mobile/lib/emergency/emergency_page.dart b/mobile/lib/emergency/emergency_page.dartindex 430f5731a6..bd8995886f 100644--- a/mobile/lib/emergency/emergency_page.dart+++ b/mobile/lib/emergency/emergency_page.dart@@ -1,3 +1,5 @@+import "dart:async";+import "package:flutter/foundation.dart";import 'package:flutter/material.dart';import "package:flutter_svg/flutter_svg.dart";@@ -49,7 +51,7 @@ class _EmergencyPageState extends State<EmergencyPage> {Future.delayed(const Duration(seconds: 0),() async {- await _fetchData();+ unawaited(_fetchData());},);}@@ -229,7 +231,7 @@ class _EmergencyPageState extends State<EmergencyPage> {context,AddContactPage(info!),);- _fetchData();+ unawaited(_fetchData());},),],@@ -250,7 +252,7 @@ class _EmergencyPageState extends State<EmergencyPage> {context,AddContactPage(info!),);- _fetchData();+ unawaited(_fetchData());},isTopBorderRadiusRemoved: trustedContacts.isNotEmpty,singleBorderRadius: 8,@@ -321,7 +323,7 @@ class _EmergencyPageState extends State<EmergencyPage> {),);if (mounted) {- _fetchData();+ unawaited(_fetchData());}}},@@ -372,11 +374,11 @@ class _EmergencyPageState extends State<EmergencyPage> {shouldShowSuccessConfirmation: false,onTap: () async {await EmergencyContactService.instance- .updateContact(contact, ContactState.UserRevokedContact);+ .updateContact(contact, ContactState.userRevokedContact);info?.contacts.remove(contact);if (mounted) {setState(() {});- _fetchData();+ unawaited(_fetchData());}},isInAlert: true,@@ -408,11 +410,11 @@ class _EmergencyPageState extends State<EmergencyPage> {shouldShowSuccessConfirmation: false,onTap: () async {await EmergencyContactService.instance- .updateContact(contact, ContactState.UserRevokedContact);+ .updateContact(contact, ContactState.userRevokedContact);info?.contacts.remove(contact);if (mounted) {setState(() {});- _fetchData();+ unawaited(_fetchData());}},isInAlert: true,@@ -445,9 +447,9 @@ class _EmergencyPageState extends State<EmergencyPage> {buttonAction: ButtonAction.first,onTap: () async {await EmergencyContactService.instance- .updateContact(contact, ContactState.ContactAccepted);+ .updateContact(contact, ContactState.contactAccepted);final updatedContact =- contact.copyWith(state: ContactState.ContactAccepted);+ contact.copyWith(state: ContactState.contactAccepted);info?.othersEmergencyContact.remove(contact);info?.othersEmergencyContact.add(updatedContact);if (mounted) {@@ -464,7 +466,7 @@ class _EmergencyPageState extends State<EmergencyPage> {shouldStickToDarkTheme: true,onTap: () async {await EmergencyContactService.instance- .updateContact(contact, ContactState.ContactDenied);+ .updateContact(contact, ContactState.contactDenied);info?.othersEmergencyContact.remove(contact);if (mounted) {setState(() {});@@ -506,7 +508,7 @@ class _EmergencyPageState extends State<EmergencyPage> {if (mounted) {setState(() {});}- _fetchData().ignore();+ unawaited(_fetchData());},isInAlert: true,),diff --git a/mobile/lib/emergency/model.dart b/mobile/lib/emergency/model.dartindex 7d100e8bb2..e85c7456ca 100644--- a/mobile/lib/emergency/model.dart+++ b/mobile/lib/emergency/model.dart@@ -1,26 +1,26 @@import "package:photos/models/api/collection/user.dart";enum ContactState {- UserInvitedContact,- UserRevokedContact,- ContactAccepted,- ContactLeft,- ContactDenied,- Unknown,+ userInvitedContact,+ userRevokedContact,+ contactAccepted,+ contactLeft,+ contactDenied,+ unknown,}extension ContactStateExtension on ContactState {String get stringValue {switch (this) {- case ContactState.UserInvitedContact:+ case ContactState.userInvitedContact:return "INVITED";- case ContactState.UserRevokedContact:+ case ContactState.userRevokedContact:return "REVOKED";- case ContactState.ContactAccepted:+ case ContactState.contactAccepted:return "ACCEPTED";- case ContactState.ContactLeft:+ case ContactState.contactLeft:return "CONTACT_LEFT";- case ContactState.ContactDenied:+ case ContactState.contactDenied:return "CONTACT_DENIED";default:return "UNKNOWN";@@ -30,17 +30,17 @@ extension ContactStateExtension on ContactState {static ContactState fromString(String value) {switch (value) {case "INVITED":- return ContactState.UserInvitedContact;+ return ContactState.userInvitedContact;case "REVOKED":- return ContactState.UserRevokedContact;+ return ContactState.userRevokedContact;case "ACCEPTED":- return ContactState.ContactAccepted;+ return ContactState.contactAccepted;case "CONTACT_LEFT":- return ContactState.ContactLeft;+ return ContactState.contactLeft;case "CONTACT_DENIED":- return ContactState.ContactDenied;+ return ContactState.contactDenied;default:- return ContactState.Unknown;+ return ContactState.unknown;}}}@@ -85,7 +85,7 @@ class EmergencyContact {}bool isPendingInvite() {- return state == ContactState.UserInvitedContact;+ return state == ContactState.userInvitedContact;}}diff --git a/mobile/lib/emergency/other_contact_page.dart b/mobile/lib/emergency/other_contact_page.dartindex 9228a4057e..b4bde774d4 100644--- a/mobile/lib/emergency/other_contact_page.dart+++ b/mobile/lib/emergency/other_contact_page.dart@@ -169,7 +169,7 @@ class _OtherContactPageState extends State<OtherContactPage> {routeToPage(context,RecoverOthersAccount(key, attributes, recoverySession!),- );+ ).ignore();},),if (recoverySession != null && recoverySession!.status == "WAITING")@@ -210,19 +210,18 @@ class _OtherContactPageState extends State<OtherContactPage> {menuItemColor: getEnteColorScheme(context).fillFaint,surfaceExecutionStates: false,onTap: () async {- final actionResult = await showChoiceActionSheet(+ await showChoiceActionSheet(context,title: "Remove",firstButtonLabel: S.of(context).yes,body: "Are you sure your want to stop being a trusted ""contact for $accountEmail?",isCritical: true,-firstButtonOnTap: () async {try {await EmergencyContactService.instance.updateContact(widget.contact,- ContactState.ContactLeft,+ ContactState.contactLeft,);Navigator.of(context).pop(true);} catch (e) {diff --git a/mobile/lib/emergency/recover_others_account.dart b/mobile/lib/emergency/recover_others_account.dartindex cf829dbce5..d29683ecfd 100644--- a/mobile/lib/emergency/recover_others_account.dart+++ b/mobile/lib/emergency/recover_others_account.dart@@ -108,7 +108,7 @@ class _RecoverOthersAccountState extends State<RecoverOthersAccount> {}Widget _getBody(String buttonTextAndHeading) {- final email = widget.sessions!.user.email;+ final email = widget.sessions.user.email;var passwordStrengthText = S.of(context).weakStrength;var passwordStrengthColor = Colors.redAccent;if (_passwordStrength > kStrongPasswordStrengthThreshold) {diff --git a/mobile/lib/emergency/select_contact_page.dart b/mobile/lib/emergency/select_contact_page.dartindex 37bd9ccc6c..3e33d96d4e 100644--- a/mobile/lib/emergency/select_contact_page.dart+++ b/mobile/lib/emergency/select_contact_page.dart@@ -216,7 +216,7 @@ class _AddContactPage extends State<AddContactPage> {}final emailToAdd =selectedEmail == '' ? _email : selectedEmail;- showDialog(+ await showDialog(context: context,builder: (BuildContext context) {return VerifyIdentifyDialog(