mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-03-03 12:16:47 +00:00
fix: authentication not enforced
This commit is contained in:
parent
a6b673afad
commit
47904275e1
6 changed files with 21 additions and 15 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 7930d9727019344238297d810661bc3e8f724c37
|
||||
Subproject commit 3a3a7e5a6323da5413e3dd8c21abfa7cbe1c3a6f
|
||||
|
|
@ -44,15 +44,6 @@ void main() async {
|
|||
}
|
||||
|
||||
unawaited(performTwonlySafeBackup());
|
||||
|
||||
if (gUser.appVersion < 90) {
|
||||
// BUG: Requested media files for reupload where not reuploaded because the wrong state...
|
||||
await twonlyDB.mediaFilesDao.updateAllRetransmissionUploadingState();
|
||||
await updateUserdata((u) {
|
||||
u.appVersion = 90;
|
||||
return u;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
globalApplicationCacheDirectory = (await getApplicationCacheDirectory()).path;
|
||||
|
|
@ -73,6 +64,17 @@ void main() async {
|
|||
apiService = ApiService();
|
||||
twonlyDB = TwonlyDB();
|
||||
|
||||
if (user != null) {
|
||||
if (gUser.appVersion < 90) {
|
||||
// BUG: Requested media files for reupload where not reuploaded because the wrong state...
|
||||
await twonlyDB.mediaFilesDao.updateAllRetransmissionUploadingState();
|
||||
await updateUserdata((u) {
|
||||
u.appVersion = 90;
|
||||
return u;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
await twonlyDB.messagesDao.purgeMessageTable();
|
||||
await twonlyDB.receiptsDao.purgeReceivedReceipts();
|
||||
unawaited(MediaFileService.purgeTempFolder());
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ abstract class AppLocalizations {
|
|||
/// No description provided for @settingsAccount.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Konto'**
|
||||
/// **'Account'**
|
||||
String get settingsAccount;
|
||||
|
||||
/// No description provided for @settingsSubscription.
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
String get settingsProfileEditDisplayNameNew => 'New Displayname';
|
||||
|
||||
@override
|
||||
String get settingsAccount => 'Konto';
|
||||
String get settingsAccount => 'Account';
|
||||
|
||||
@override
|
||||
String get settingsSubscription => 'Subscription';
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ class AppLocalizationsSv extends AppLocalizations {
|
|||
String get settingsProfileEditDisplayNameNew => 'New Displayname';
|
||||
|
||||
@override
|
||||
String get settingsAccount => 'Konto';
|
||||
String get settingsAccount => 'Account';
|
||||
|
||||
@override
|
||||
String get settingsSubscription => 'Subscription';
|
||||
|
|
|
|||
|
|
@ -159,10 +159,14 @@ Future<bool> authenticateUser(
|
|||
}
|
||||
} on LocalAuthException catch (e) {
|
||||
Log.error(e.toString());
|
||||
if (e.code == LocalAuthExceptionCode.noBiometricHardware ||
|
||||
e.code == LocalAuthExceptionCode.noBiometricsEnrolled ||
|
||||
e.code == LocalAuthExceptionCode.noCredentialsSet) {
|
||||
if (!force) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue