disable memories

This commit is contained in:
otsmr 2026-07-20 20:56:52 +02:00
parent ee82a95861
commit ffc88dfe7a
11 changed files with 607 additions and 538 deletions

View file

@ -256,4 +256,23 @@ class MediaFilesDao extends DatabaseAccessor<TwonlyDB>
)) ))
.get(); .get();
} }
Future<int> getCloudOnlyMemoriesCount() async {
final query = select(mediaFiles)
..where(
(t) =>
t.stored.equals(true) &
t.cloudState.equals(CloudState.uploaded.name),
);
final rows = await query.get();
var count = 0;
for (final row in rows) {
final ms = MediaFileService(row);
if (!(ms.storedPath.existsSync() && ms.storedPath.lengthSync() > 0)) {
count++;
}
}
return count;
}
} }

View file

@ -4237,6 +4237,42 @@ abstract class AppLocalizations {
/// In en, this message translates to: /// In en, this message translates to:
/// **'Local only'** /// **'Local only'**
String get settingsStorageLocalOnly; String get settingsStorageLocalOnly;
/// No description provided for @settingsStorageDisableBackupTitle.
///
/// In en, this message translates to:
/// **'Disable Backup?'**
String get settingsStorageDisableBackupTitle;
/// No description provided for @settingsStorageDisableBackupBody.
///
/// In en, this message translates to:
/// **'This will delete all backed up memories from the cloud. There {count, plural, =1 {is *1 image*} other {are *{count} images*}} only stored in the cloud that will be *permanently lost*. Are you sure you want to proceed?'**
String settingsStorageDisableBackupBody(num count);
/// No description provided for @settingsStorageDisableBackupBtn.
///
/// In en, this message translates to:
/// **'Disable'**
String get settingsStorageDisableBackupBtn;
/// No description provided for @settingsStorageDisableBackupAction.
///
/// In en, this message translates to:
/// **'Disable Cloud Backup'**
String get settingsStorageDisableBackupAction;
/// No description provided for @settingsStorageSyncNow.
///
/// In en, this message translates to:
/// **'Sync now'**
String get settingsStorageSyncNow;
/// No description provided for @settingsStorageSyncUpToDate.
///
/// In en, this message translates to:
/// **'All memories are up to date.'**
String get settingsStorageSyncUpToDate;
} }
class _AppLocalizationsDelegate class _AppLocalizationsDelegate

View file

@ -2448,4 +2448,31 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get settingsStorageLocalOnly => 'Nur lokal'; String get settingsStorageLocalOnly => 'Nur lokal';
@override
String get settingsStorageDisableBackupTitle => 'Backup deaktivieren?';
@override
String settingsStorageDisableBackupBody(num count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: '*$count Bilder*, die',
one: '*1 Bild*, das',
);
return 'Dadurch werden alle gesicherten Erinnerungen aus der Cloud gelöscht. Es gibt $_temp0 nur in der Cloud und nicht lokal gespeichert sind. Diese gehen *dauerhaft verloren*. Fortfahren?';
}
@override
String get settingsStorageDisableBackupBtn => 'Deaktivieren';
@override
String get settingsStorageDisableBackupAction => 'Cloud-Backup deaktivieren';
@override
String get settingsStorageSyncNow => 'Jetzt synchronisieren';
@override
String get settingsStorageSyncUpToDate =>
'Alle Memories sind auf dem neuesten Stand.';
} }

View file

@ -2427,4 +2427,30 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get settingsStorageLocalOnly => 'Local only'; String get settingsStorageLocalOnly => 'Local only';
@override
String get settingsStorageDisableBackupTitle => 'Disable Backup?';
@override
String settingsStorageDisableBackupBody(num count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: 'are *$count images*',
one: 'is *1 image*',
);
return 'This will delete all backed up memories from the cloud. There $_temp0 only stored in the cloud that will be *permanently lost*. Are you sure you want to proceed?';
}
@override
String get settingsStorageDisableBackupBtn => 'Disable';
@override
String get settingsStorageDisableBackupAction => 'Disable Cloud Backup';
@override
String get settingsStorageSyncNow => 'Sync now';
@override
String get settingsStorageSyncUpToDate => 'All memories are up to date.';
} }

@ -1 +1 @@
Subproject commit bcfb2b02c59d1e3afe66b310296cb0f03eb75a72 Subproject commit 34c835db2de08af962b39fb79ec11341b8847926

View file

@ -2472,47 +2472,6 @@ class ApplicationData_SetLoginToken extends $pb.GeneratedMessage {
void clearLoginToken() => $_clearField(1); void clearLoginToken() => $_clearField(1);
} }
class ApplicationData_Deprecated extends $pb.GeneratedMessage {
factory ApplicationData_Deprecated() => create();
ApplicationData_Deprecated._();
factory ApplicationData_Deprecated.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory ApplicationData_Deprecated.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'ApplicationData.Deprecated',
package:
const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'),
createEmptyInstance: create)
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
ApplicationData_Deprecated clone() => deepCopy();
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
ApplicationData_Deprecated copyWith(
void Function(ApplicationData_Deprecated) updates) =>
super.copyWith(
(message) => updates(message as ApplicationData_Deprecated))
as ApplicationData_Deprecated;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_Deprecated create() => ApplicationData_Deprecated._();
@$core.override
ApplicationData_Deprecated createEmptyInstance() => create();
@$core.pragma('dart2js:noInline')
static ApplicationData_Deprecated getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<ApplicationData_Deprecated>(create);
static ApplicationData_Deprecated? _defaultInstance;
}
class ApplicationData_RegisterPasswordLessRecovery class ApplicationData_RegisterPasswordLessRecovery
extends $pb.GeneratedMessage { extends $pb.GeneratedMessage {
factory ApplicationData_RegisterPasswordLessRecovery({ factory ApplicationData_RegisterPasswordLessRecovery({
@ -3054,23 +3013,59 @@ class ApplicationData_DeleteMemory extends $pb.GeneratedMessage {
void clearMediaId() => $_clearField(1); void clearMediaId() => $_clearField(1);
} }
class ApplicationData_DisableMemoriesBackup extends $pb.GeneratedMessage {
factory ApplicationData_DisableMemoriesBackup() => create();
ApplicationData_DisableMemoriesBackup._();
factory ApplicationData_DisableMemoriesBackup.fromBuffer(
$core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory ApplicationData_DisableMemoriesBackup.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'ApplicationData.DisableMemoriesBackup',
package:
const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'),
createEmptyInstance: create)
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
ApplicationData_DisableMemoriesBackup clone() => deepCopy();
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
ApplicationData_DisableMemoriesBackup copyWith(
void Function(ApplicationData_DisableMemoriesBackup) updates) =>
super.copyWith((message) =>
updates(message as ApplicationData_DisableMemoriesBackup))
as ApplicationData_DisableMemoriesBackup;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_DisableMemoriesBackup create() =>
ApplicationData_DisableMemoriesBackup._();
@$core.override
ApplicationData_DisableMemoriesBackup createEmptyInstance() => create();
@$core.pragma('dart2js:noInline')
static ApplicationData_DisableMemoriesBackup getDefault() =>
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<
ApplicationData_DisableMemoriesBackup>(create);
static ApplicationData_DisableMemoriesBackup? _defaultInstance;
}
enum ApplicationData_ApplicationData { enum ApplicationData_ApplicationData {
textMessage, textMessage,
getUserByUsername, getUserByUsername,
getPrekeysByUserId, getPrekeysByUserId,
getUserById, getUserById,
updateGoogleFcmToken, updateGoogleFcmToken,
deprecated9,
getCurrentPlanInfos, getCurrentPlanInfos,
deprecated11,
getAvailablePlans, getAvailablePlans,
deprecated13,
deprecated14,
deprecated15,
deprecated16,
deprecated17,
removeAdditionalUser, removeAdditionalUser,
deprecated19,
downloadDone, downloadDone,
getSignedPrekeyByUserid, getSignedPrekeyByUserid,
updateSignedPrekey, updateSignedPrekey,
@ -3089,6 +3084,7 @@ enum ApplicationData_ApplicationData {
getMemoriesUrl, getMemoriesUrl,
getMemoriesUsage, getMemoriesUsage,
deleteMemory, deleteMemory,
disableMemoriesBackup,
notSet notSet
} }
@ -3099,17 +3095,9 @@ class ApplicationData extends $pb.GeneratedMessage {
ApplicationData_GetPrekeysByUserId? getPrekeysByUserId, ApplicationData_GetPrekeysByUserId? getPrekeysByUserId,
ApplicationData_GetUserById? getUserById, ApplicationData_GetUserById? getUserById,
ApplicationData_UpdateGoogleFcmToken? updateGoogleFcmToken, ApplicationData_UpdateGoogleFcmToken? updateGoogleFcmToken,
ApplicationData_Deprecated? deprecated9,
ApplicationData_GetCurrentPlanInfos? getCurrentPlanInfos, ApplicationData_GetCurrentPlanInfos? getCurrentPlanInfos,
ApplicationData_Deprecated? deprecated11,
ApplicationData_GetAvailablePlans? getAvailablePlans, ApplicationData_GetAvailablePlans? getAvailablePlans,
ApplicationData_Deprecated? deprecated13,
ApplicationData_Deprecated? deprecated14,
ApplicationData_Deprecated? deprecated15,
ApplicationData_Deprecated? deprecated16,
ApplicationData_Deprecated? deprecated17,
ApplicationData_RemoveAdditionalUser? removeAdditionalUser, ApplicationData_RemoveAdditionalUser? removeAdditionalUser,
ApplicationData_Deprecated? deprecated19,
ApplicationData_DownloadDone? downloadDone, ApplicationData_DownloadDone? downloadDone,
ApplicationData_GetSignedPreKeyByUserId? getSignedPrekeyByUserid, ApplicationData_GetSignedPreKeyByUserId? getSignedPrekeyByUserid,
ApplicationData_UpdateSignedPreKey? updateSignedPrekey, ApplicationData_UpdateSignedPreKey? updateSignedPrekey,
@ -3128,6 +3116,7 @@ class ApplicationData extends $pb.GeneratedMessage {
ApplicationData_GetMemoriesUrl? getMemoriesUrl, ApplicationData_GetMemoriesUrl? getMemoriesUrl,
ApplicationData_GetMemoriesUsage? getMemoriesUsage, ApplicationData_GetMemoriesUsage? getMemoriesUsage,
ApplicationData_DeleteMemory? deleteMemory, ApplicationData_DeleteMemory? deleteMemory,
ApplicationData_DisableMemoriesBackup? disableMemoriesBackup,
}) { }) {
final result = create(); final result = create();
if (textMessage != null) result.textMessage = textMessage; if (textMessage != null) result.textMessage = textMessage;
@ -3137,19 +3126,11 @@ class ApplicationData extends $pb.GeneratedMessage {
if (getUserById != null) result.getUserById = getUserById; if (getUserById != null) result.getUserById = getUserById;
if (updateGoogleFcmToken != null) if (updateGoogleFcmToken != null)
result.updateGoogleFcmToken = updateGoogleFcmToken; result.updateGoogleFcmToken = updateGoogleFcmToken;
if (deprecated9 != null) result.deprecated9 = deprecated9;
if (getCurrentPlanInfos != null) if (getCurrentPlanInfos != null)
result.getCurrentPlanInfos = getCurrentPlanInfos; result.getCurrentPlanInfos = getCurrentPlanInfos;
if (deprecated11 != null) result.deprecated11 = deprecated11;
if (getAvailablePlans != null) result.getAvailablePlans = getAvailablePlans; if (getAvailablePlans != null) result.getAvailablePlans = getAvailablePlans;
if (deprecated13 != null) result.deprecated13 = deprecated13;
if (deprecated14 != null) result.deprecated14 = deprecated14;
if (deprecated15 != null) result.deprecated15 = deprecated15;
if (deprecated16 != null) result.deprecated16 = deprecated16;
if (deprecated17 != null) result.deprecated17 = deprecated17;
if (removeAdditionalUser != null) if (removeAdditionalUser != null)
result.removeAdditionalUser = removeAdditionalUser; result.removeAdditionalUser = removeAdditionalUser;
if (deprecated19 != null) result.deprecated19 = deprecated19;
if (downloadDone != null) result.downloadDone = downloadDone; if (downloadDone != null) result.downloadDone = downloadDone;
if (getSignedPrekeyByUserid != null) if (getSignedPrekeyByUserid != null)
result.getSignedPrekeyByUserid = getSignedPrekeyByUserid; result.getSignedPrekeyByUserid = getSignedPrekeyByUserid;
@ -3174,6 +3155,8 @@ class ApplicationData extends $pb.GeneratedMessage {
if (getMemoriesUrl != null) result.getMemoriesUrl = getMemoriesUrl; if (getMemoriesUrl != null) result.getMemoriesUrl = getMemoriesUrl;
if (getMemoriesUsage != null) result.getMemoriesUsage = getMemoriesUsage; if (getMemoriesUsage != null) result.getMemoriesUsage = getMemoriesUsage;
if (deleteMemory != null) result.deleteMemory = deleteMemory; if (deleteMemory != null) result.deleteMemory = deleteMemory;
if (disableMemoriesBackup != null)
result.disableMemoriesBackup = disableMemoriesBackup;
return result; return result;
} }
@ -3193,17 +3176,9 @@ class ApplicationData extends $pb.GeneratedMessage {
3: ApplicationData_ApplicationData.getPrekeysByUserId, 3: ApplicationData_ApplicationData.getPrekeysByUserId,
6: ApplicationData_ApplicationData.getUserById, 6: ApplicationData_ApplicationData.getUserById,
8: ApplicationData_ApplicationData.updateGoogleFcmToken, 8: ApplicationData_ApplicationData.updateGoogleFcmToken,
9: ApplicationData_ApplicationData.deprecated9,
10: ApplicationData_ApplicationData.getCurrentPlanInfos, 10: ApplicationData_ApplicationData.getCurrentPlanInfos,
11: ApplicationData_ApplicationData.deprecated11,
12: ApplicationData_ApplicationData.getAvailablePlans, 12: ApplicationData_ApplicationData.getAvailablePlans,
13: ApplicationData_ApplicationData.deprecated13,
14: ApplicationData_ApplicationData.deprecated14,
15: ApplicationData_ApplicationData.deprecated15,
16: ApplicationData_ApplicationData.deprecated16,
17: ApplicationData_ApplicationData.deprecated17,
18: ApplicationData_ApplicationData.removeAdditionalUser, 18: ApplicationData_ApplicationData.removeAdditionalUser,
19: ApplicationData_ApplicationData.deprecated19,
20: ApplicationData_ApplicationData.downloadDone, 20: ApplicationData_ApplicationData.downloadDone,
22: ApplicationData_ApplicationData.getSignedPrekeyByUserid, 22: ApplicationData_ApplicationData.getSignedPrekeyByUserid,
23: ApplicationData_ApplicationData.updateSignedPrekey, 23: ApplicationData_ApplicationData.updateSignedPrekey,
@ -3222,6 +3197,7 @@ class ApplicationData extends $pb.GeneratedMessage {
36: ApplicationData_ApplicationData.getMemoriesUrl, 36: ApplicationData_ApplicationData.getMemoriesUrl,
37: ApplicationData_ApplicationData.getMemoriesUsage, 37: ApplicationData_ApplicationData.getMemoriesUsage,
38: ApplicationData_ApplicationData.deleteMemory, 38: ApplicationData_ApplicationData.deleteMemory,
39: ApplicationData_ApplicationData.disableMemoriesBackup,
0: ApplicationData_ApplicationData.notSet 0: ApplicationData_ApplicationData.notSet
}; };
static final $pb.BuilderInfo _i = $pb.BuilderInfo( static final $pb.BuilderInfo _i = $pb.BuilderInfo(
@ -3235,17 +3211,9 @@ class ApplicationData extends $pb.GeneratedMessage {
3, 3,
6, 6,
8, 8,
9,
10, 10,
11,
12, 12,
13,
14,
15,
16,
17,
18, 18,
19,
20, 20,
22, 22,
23, 23,
@ -3263,7 +3231,8 @@ class ApplicationData extends $pb.GeneratedMessage {
35, 35,
36, 36,
37, 37,
38 38,
39
]) ])
..aOM<ApplicationData_TextMessage>(1, _omitFieldNames ? '' : 'textMessage', ..aOM<ApplicationData_TextMessage>(1, _omitFieldNames ? '' : 'textMessage',
protoName: 'textMessage', protoName: 'textMessage',
@ -3283,42 +3252,18 @@ class ApplicationData extends $pb.GeneratedMessage {
8, _omitFieldNames ? '' : 'updateGoogleFcmToken', 8, _omitFieldNames ? '' : 'updateGoogleFcmToken',
protoName: 'updateGoogleFcmToken', protoName: 'updateGoogleFcmToken',
subBuilder: ApplicationData_UpdateGoogleFcmToken.create) subBuilder: ApplicationData_UpdateGoogleFcmToken.create)
..aOM<ApplicationData_Deprecated>(9, _omitFieldNames ? '' : 'deprecated9',
protoName: 'deprecated_9',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_GetCurrentPlanInfos>( ..aOM<ApplicationData_GetCurrentPlanInfos>(
10, _omitFieldNames ? '' : 'getCurrentPlanInfos', 10, _omitFieldNames ? '' : 'getCurrentPlanInfos',
protoName: 'getCurrentPlanInfos', protoName: 'getCurrentPlanInfos',
subBuilder: ApplicationData_GetCurrentPlanInfos.create) subBuilder: ApplicationData_GetCurrentPlanInfos.create)
..aOM<ApplicationData_Deprecated>(11, _omitFieldNames ? '' : 'deprecated11',
protoName: 'deprecated_11',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_GetAvailablePlans>( ..aOM<ApplicationData_GetAvailablePlans>(
12, _omitFieldNames ? '' : 'getAvailablePlans', 12, _omitFieldNames ? '' : 'getAvailablePlans',
protoName: 'getAvailablePlans', protoName: 'getAvailablePlans',
subBuilder: ApplicationData_GetAvailablePlans.create) subBuilder: ApplicationData_GetAvailablePlans.create)
..aOM<ApplicationData_Deprecated>(13, _omitFieldNames ? '' : 'deprecated13',
protoName: 'deprecated_13',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_Deprecated>(14, _omitFieldNames ? '' : 'deprecated14',
protoName: 'deprecated_14',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_Deprecated>(15, _omitFieldNames ? '' : 'deprecated15',
protoName: 'deprecated_15',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_Deprecated>(16, _omitFieldNames ? '' : 'deprecated16',
protoName: 'deprecated_16',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_Deprecated>(17, _omitFieldNames ? '' : 'deprecated17',
protoName: 'deprecated_17',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_RemoveAdditionalUser>( ..aOM<ApplicationData_RemoveAdditionalUser>(
18, _omitFieldNames ? '' : 'removeAdditionalUser', 18, _omitFieldNames ? '' : 'removeAdditionalUser',
protoName: 'removeAdditionalUser', protoName: 'removeAdditionalUser',
subBuilder: ApplicationData_RemoveAdditionalUser.create) subBuilder: ApplicationData_RemoveAdditionalUser.create)
..aOM<ApplicationData_Deprecated>(19, _omitFieldNames ? '' : 'deprecated19',
protoName: 'deprecated_19',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_DownloadDone>( ..aOM<ApplicationData_DownloadDone>(
20, _omitFieldNames ? '' : 'downloadDone', 20, _omitFieldNames ? '' : 'downloadDone',
protoName: 'downloadDone', protoName: 'downloadDone',
@ -3379,6 +3324,9 @@ class ApplicationData extends $pb.GeneratedMessage {
..aOM<ApplicationData_DeleteMemory>( ..aOM<ApplicationData_DeleteMemory>(
38, _omitFieldNames ? '' : 'deleteMemory', 38, _omitFieldNames ? '' : 'deleteMemory',
subBuilder: ApplicationData_DeleteMemory.create) subBuilder: ApplicationData_DeleteMemory.create)
..aOM<ApplicationData_DisableMemoriesBackup>(
39, _omitFieldNames ? '' : 'disableMemoriesBackup',
subBuilder: ApplicationData_DisableMemoriesBackup.create)
..hasRequiredFields = false; ..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
@ -3405,17 +3353,9 @@ class ApplicationData extends $pb.GeneratedMessage {
@$pb.TagNumber(3) @$pb.TagNumber(3)
@$pb.TagNumber(6) @$pb.TagNumber(6)
@$pb.TagNumber(8) @$pb.TagNumber(8)
@$pb.TagNumber(9)
@$pb.TagNumber(10) @$pb.TagNumber(10)
@$pb.TagNumber(11)
@$pb.TagNumber(12) @$pb.TagNumber(12)
@$pb.TagNumber(13)
@$pb.TagNumber(14)
@$pb.TagNumber(15)
@$pb.TagNumber(16)
@$pb.TagNumber(17)
@$pb.TagNumber(18) @$pb.TagNumber(18)
@$pb.TagNumber(19)
@$pb.TagNumber(20) @$pb.TagNumber(20)
@$pb.TagNumber(22) @$pb.TagNumber(22)
@$pb.TagNumber(23) @$pb.TagNumber(23)
@ -3434,6 +3374,7 @@ class ApplicationData extends $pb.GeneratedMessage {
@$pb.TagNumber(36) @$pb.TagNumber(36)
@$pb.TagNumber(37) @$pb.TagNumber(37)
@$pb.TagNumber(38) @$pb.TagNumber(38)
@$pb.TagNumber(39)
ApplicationData_ApplicationData whichApplicationData() => ApplicationData_ApplicationData whichApplicationData() =>
_ApplicationData_ApplicationDataByTag[$_whichOneof(0)]!; _ApplicationData_ApplicationDataByTag[$_whichOneof(0)]!;
@$pb.TagNumber(1) @$pb.TagNumber(1)
@ -3441,17 +3382,9 @@ class ApplicationData extends $pb.GeneratedMessage {
@$pb.TagNumber(3) @$pb.TagNumber(3)
@$pb.TagNumber(6) @$pb.TagNumber(6)
@$pb.TagNumber(8) @$pb.TagNumber(8)
@$pb.TagNumber(9)
@$pb.TagNumber(10) @$pb.TagNumber(10)
@$pb.TagNumber(11)
@$pb.TagNumber(12) @$pb.TagNumber(12)
@$pb.TagNumber(13)
@$pb.TagNumber(14)
@$pb.TagNumber(15)
@$pb.TagNumber(16)
@$pb.TagNumber(17)
@$pb.TagNumber(18) @$pb.TagNumber(18)
@$pb.TagNumber(19)
@$pb.TagNumber(20) @$pb.TagNumber(20)
@$pb.TagNumber(22) @$pb.TagNumber(22)
@$pb.TagNumber(23) @$pb.TagNumber(23)
@ -3470,6 +3403,7 @@ class ApplicationData extends $pb.GeneratedMessage {
@$pb.TagNumber(36) @$pb.TagNumber(36)
@$pb.TagNumber(37) @$pb.TagNumber(37)
@$pb.TagNumber(38) @$pb.TagNumber(38)
@$pb.TagNumber(39)
void clearApplicationData() => $_clearField($_whichOneof(0)); void clearApplicationData() => $_clearField($_whichOneof(0));
@$pb.TagNumber(1) @$pb.TagNumber(1)
@ -3531,353 +3465,278 @@ class ApplicationData extends $pb.GeneratedMessage {
ApplicationData_UpdateGoogleFcmToken ensureUpdateGoogleFcmToken() => ApplicationData_UpdateGoogleFcmToken ensureUpdateGoogleFcmToken() =>
$_ensure(4); $_ensure(4);
@$pb.TagNumber(9)
ApplicationData_Deprecated get deprecated9 => $_getN(5);
@$pb.TagNumber(9)
set deprecated9(ApplicationData_Deprecated value) => $_setField(9, value);
@$pb.TagNumber(9)
$core.bool hasDeprecated9() => $_has(5);
@$pb.TagNumber(9)
void clearDeprecated9() => $_clearField(9);
@$pb.TagNumber(9)
ApplicationData_Deprecated ensureDeprecated9() => $_ensure(5);
@$pb.TagNumber(10) @$pb.TagNumber(10)
ApplicationData_GetCurrentPlanInfos get getCurrentPlanInfos => $_getN(6); ApplicationData_GetCurrentPlanInfos get getCurrentPlanInfos => $_getN(5);
@$pb.TagNumber(10) @$pb.TagNumber(10)
set getCurrentPlanInfos(ApplicationData_GetCurrentPlanInfos value) => set getCurrentPlanInfos(ApplicationData_GetCurrentPlanInfos value) =>
$_setField(10, value); $_setField(10, value);
@$pb.TagNumber(10) @$pb.TagNumber(10)
$core.bool hasGetCurrentPlanInfos() => $_has(6); $core.bool hasGetCurrentPlanInfos() => $_has(5);
@$pb.TagNumber(10) @$pb.TagNumber(10)
void clearGetCurrentPlanInfos() => $_clearField(10); void clearGetCurrentPlanInfos() => $_clearField(10);
@$pb.TagNumber(10) @$pb.TagNumber(10)
ApplicationData_GetCurrentPlanInfos ensureGetCurrentPlanInfos() => ApplicationData_GetCurrentPlanInfos ensureGetCurrentPlanInfos() =>
$_ensure(6); $_ensure(5);
@$pb.TagNumber(11)
ApplicationData_Deprecated get deprecated11 => $_getN(7);
@$pb.TagNumber(11)
set deprecated11(ApplicationData_Deprecated value) => $_setField(11, value);
@$pb.TagNumber(11)
$core.bool hasDeprecated11() => $_has(7);
@$pb.TagNumber(11)
void clearDeprecated11() => $_clearField(11);
@$pb.TagNumber(11)
ApplicationData_Deprecated ensureDeprecated11() => $_ensure(7);
@$pb.TagNumber(12) @$pb.TagNumber(12)
ApplicationData_GetAvailablePlans get getAvailablePlans => $_getN(8); ApplicationData_GetAvailablePlans get getAvailablePlans => $_getN(6);
@$pb.TagNumber(12) @$pb.TagNumber(12)
set getAvailablePlans(ApplicationData_GetAvailablePlans value) => set getAvailablePlans(ApplicationData_GetAvailablePlans value) =>
$_setField(12, value); $_setField(12, value);
@$pb.TagNumber(12) @$pb.TagNumber(12)
$core.bool hasGetAvailablePlans() => $_has(8); $core.bool hasGetAvailablePlans() => $_has(6);
@$pb.TagNumber(12) @$pb.TagNumber(12)
void clearGetAvailablePlans() => $_clearField(12); void clearGetAvailablePlans() => $_clearField(12);
@$pb.TagNumber(12) @$pb.TagNumber(12)
ApplicationData_GetAvailablePlans ensureGetAvailablePlans() => $_ensure(8); ApplicationData_GetAvailablePlans ensureGetAvailablePlans() => $_ensure(6);
@$pb.TagNumber(13)
ApplicationData_Deprecated get deprecated13 => $_getN(9);
@$pb.TagNumber(13)
set deprecated13(ApplicationData_Deprecated value) => $_setField(13, value);
@$pb.TagNumber(13)
$core.bool hasDeprecated13() => $_has(9);
@$pb.TagNumber(13)
void clearDeprecated13() => $_clearField(13);
@$pb.TagNumber(13)
ApplicationData_Deprecated ensureDeprecated13() => $_ensure(9);
@$pb.TagNumber(14)
ApplicationData_Deprecated get deprecated14 => $_getN(10);
@$pb.TagNumber(14)
set deprecated14(ApplicationData_Deprecated value) => $_setField(14, value);
@$pb.TagNumber(14)
$core.bool hasDeprecated14() => $_has(10);
@$pb.TagNumber(14)
void clearDeprecated14() => $_clearField(14);
@$pb.TagNumber(14)
ApplicationData_Deprecated ensureDeprecated14() => $_ensure(10);
@$pb.TagNumber(15)
ApplicationData_Deprecated get deprecated15 => $_getN(11);
@$pb.TagNumber(15)
set deprecated15(ApplicationData_Deprecated value) => $_setField(15, value);
@$pb.TagNumber(15)
$core.bool hasDeprecated15() => $_has(11);
@$pb.TagNumber(15)
void clearDeprecated15() => $_clearField(15);
@$pb.TagNumber(15)
ApplicationData_Deprecated ensureDeprecated15() => $_ensure(11);
@$pb.TagNumber(16)
ApplicationData_Deprecated get deprecated16 => $_getN(12);
@$pb.TagNumber(16)
set deprecated16(ApplicationData_Deprecated value) => $_setField(16, value);
@$pb.TagNumber(16)
$core.bool hasDeprecated16() => $_has(12);
@$pb.TagNumber(16)
void clearDeprecated16() => $_clearField(16);
@$pb.TagNumber(16)
ApplicationData_Deprecated ensureDeprecated16() => $_ensure(12);
@$pb.TagNumber(17)
ApplicationData_Deprecated get deprecated17 => $_getN(13);
@$pb.TagNumber(17)
set deprecated17(ApplicationData_Deprecated value) => $_setField(17, value);
@$pb.TagNumber(17)
$core.bool hasDeprecated17() => $_has(13);
@$pb.TagNumber(17)
void clearDeprecated17() => $_clearField(17);
@$pb.TagNumber(17)
ApplicationData_Deprecated ensureDeprecated17() => $_ensure(13);
@$pb.TagNumber(18) @$pb.TagNumber(18)
ApplicationData_RemoveAdditionalUser get removeAdditionalUser => $_getN(14); ApplicationData_RemoveAdditionalUser get removeAdditionalUser => $_getN(7);
@$pb.TagNumber(18) @$pb.TagNumber(18)
set removeAdditionalUser(ApplicationData_RemoveAdditionalUser value) => set removeAdditionalUser(ApplicationData_RemoveAdditionalUser value) =>
$_setField(18, value); $_setField(18, value);
@$pb.TagNumber(18) @$pb.TagNumber(18)
$core.bool hasRemoveAdditionalUser() => $_has(14); $core.bool hasRemoveAdditionalUser() => $_has(7);
@$pb.TagNumber(18) @$pb.TagNumber(18)
void clearRemoveAdditionalUser() => $_clearField(18); void clearRemoveAdditionalUser() => $_clearField(18);
@$pb.TagNumber(18) @$pb.TagNumber(18)
ApplicationData_RemoveAdditionalUser ensureRemoveAdditionalUser() => ApplicationData_RemoveAdditionalUser ensureRemoveAdditionalUser() =>
$_ensure(14); $_ensure(7);
@$pb.TagNumber(19)
ApplicationData_Deprecated get deprecated19 => $_getN(15);
@$pb.TagNumber(19)
set deprecated19(ApplicationData_Deprecated value) => $_setField(19, value);
@$pb.TagNumber(19)
$core.bool hasDeprecated19() => $_has(15);
@$pb.TagNumber(19)
void clearDeprecated19() => $_clearField(19);
@$pb.TagNumber(19)
ApplicationData_Deprecated ensureDeprecated19() => $_ensure(15);
@$pb.TagNumber(20) @$pb.TagNumber(20)
ApplicationData_DownloadDone get downloadDone => $_getN(16); ApplicationData_DownloadDone get downloadDone => $_getN(8);
@$pb.TagNumber(20) @$pb.TagNumber(20)
set downloadDone(ApplicationData_DownloadDone value) => $_setField(20, value); set downloadDone(ApplicationData_DownloadDone value) => $_setField(20, value);
@$pb.TagNumber(20) @$pb.TagNumber(20)
$core.bool hasDownloadDone() => $_has(16); $core.bool hasDownloadDone() => $_has(8);
@$pb.TagNumber(20) @$pb.TagNumber(20)
void clearDownloadDone() => $_clearField(20); void clearDownloadDone() => $_clearField(20);
@$pb.TagNumber(20) @$pb.TagNumber(20)
ApplicationData_DownloadDone ensureDownloadDone() => $_ensure(16); ApplicationData_DownloadDone ensureDownloadDone() => $_ensure(8);
@$pb.TagNumber(22) @$pb.TagNumber(22)
ApplicationData_GetSignedPreKeyByUserId get getSignedPrekeyByUserid => ApplicationData_GetSignedPreKeyByUserId get getSignedPrekeyByUserid =>
$_getN(17); $_getN(9);
@$pb.TagNumber(22) @$pb.TagNumber(22)
set getSignedPrekeyByUserid(ApplicationData_GetSignedPreKeyByUserId value) => set getSignedPrekeyByUserid(ApplicationData_GetSignedPreKeyByUserId value) =>
$_setField(22, value); $_setField(22, value);
@$pb.TagNumber(22) @$pb.TagNumber(22)
$core.bool hasGetSignedPrekeyByUserid() => $_has(17); $core.bool hasGetSignedPrekeyByUserid() => $_has(9);
@$pb.TagNumber(22) @$pb.TagNumber(22)
void clearGetSignedPrekeyByUserid() => $_clearField(22); void clearGetSignedPrekeyByUserid() => $_clearField(22);
@$pb.TagNumber(22) @$pb.TagNumber(22)
ApplicationData_GetSignedPreKeyByUserId ensureGetSignedPrekeyByUserid() => ApplicationData_GetSignedPreKeyByUserId ensureGetSignedPrekeyByUserid() =>
$_ensure(17); $_ensure(9);
@$pb.TagNumber(23) @$pb.TagNumber(23)
ApplicationData_UpdateSignedPreKey get updateSignedPrekey => $_getN(18); ApplicationData_UpdateSignedPreKey get updateSignedPrekey => $_getN(10);
@$pb.TagNumber(23) @$pb.TagNumber(23)
set updateSignedPrekey(ApplicationData_UpdateSignedPreKey value) => set updateSignedPrekey(ApplicationData_UpdateSignedPreKey value) =>
$_setField(23, value); $_setField(23, value);
@$pb.TagNumber(23) @$pb.TagNumber(23)
$core.bool hasUpdateSignedPrekey() => $_has(18); $core.bool hasUpdateSignedPrekey() => $_has(10);
@$pb.TagNumber(23) @$pb.TagNumber(23)
void clearUpdateSignedPrekey() => $_clearField(23); void clearUpdateSignedPrekey() => $_clearField(23);
@$pb.TagNumber(23) @$pb.TagNumber(23)
ApplicationData_UpdateSignedPreKey ensureUpdateSignedPrekey() => $_ensure(18); ApplicationData_UpdateSignedPreKey ensureUpdateSignedPrekey() => $_ensure(10);
@$pb.TagNumber(24) @$pb.TagNumber(24)
ApplicationData_DeleteAccount get deleteAccount => $_getN(19); ApplicationData_DeleteAccount get deleteAccount => $_getN(11);
@$pb.TagNumber(24) @$pb.TagNumber(24)
set deleteAccount(ApplicationData_DeleteAccount value) => set deleteAccount(ApplicationData_DeleteAccount value) =>
$_setField(24, value); $_setField(24, value);
@$pb.TagNumber(24) @$pb.TagNumber(24)
$core.bool hasDeleteAccount() => $_has(19); $core.bool hasDeleteAccount() => $_has(11);
@$pb.TagNumber(24) @$pb.TagNumber(24)
void clearDeleteAccount() => $_clearField(24); void clearDeleteAccount() => $_clearField(24);
@$pb.TagNumber(24) @$pb.TagNumber(24)
ApplicationData_DeleteAccount ensureDeleteAccount() => $_ensure(19); ApplicationData_DeleteAccount ensureDeleteAccount() => $_ensure(11);
@$pb.TagNumber(25) @$pb.TagNumber(25)
ApplicationData_ReportUser get reportUser => $_getN(20); ApplicationData_ReportUser get reportUser => $_getN(12);
@$pb.TagNumber(25) @$pb.TagNumber(25)
set reportUser(ApplicationData_ReportUser value) => $_setField(25, value); set reportUser(ApplicationData_ReportUser value) => $_setField(25, value);
@$pb.TagNumber(25) @$pb.TagNumber(25)
$core.bool hasReportUser() => $_has(20); $core.bool hasReportUser() => $_has(12);
@$pb.TagNumber(25) @$pb.TagNumber(25)
void clearReportUser() => $_clearField(25); void clearReportUser() => $_clearField(25);
@$pb.TagNumber(25) @$pb.TagNumber(25)
ApplicationData_ReportUser ensureReportUser() => $_ensure(20); ApplicationData_ReportUser ensureReportUser() => $_ensure(12);
@$pb.TagNumber(26) @$pb.TagNumber(26)
ApplicationData_ChangeUsername get changeUsername => $_getN(21); ApplicationData_ChangeUsername get changeUsername => $_getN(13);
@$pb.TagNumber(26) @$pb.TagNumber(26)
set changeUsername(ApplicationData_ChangeUsername value) => set changeUsername(ApplicationData_ChangeUsername value) =>
$_setField(26, value); $_setField(26, value);
@$pb.TagNumber(26) @$pb.TagNumber(26)
$core.bool hasChangeUsername() => $_has(21); $core.bool hasChangeUsername() => $_has(13);
@$pb.TagNumber(26) @$pb.TagNumber(26)
void clearChangeUsername() => $_clearField(26); void clearChangeUsername() => $_clearField(26);
@$pb.TagNumber(26) @$pb.TagNumber(26)
ApplicationData_ChangeUsername ensureChangeUsername() => $_ensure(21); ApplicationData_ChangeUsername ensureChangeUsername() => $_ensure(13);
@$pb.TagNumber(27) @$pb.TagNumber(27)
ApplicationData_IPAPurchase get ipaPurchase => $_getN(22); ApplicationData_IPAPurchase get ipaPurchase => $_getN(14);
@$pb.TagNumber(27) @$pb.TagNumber(27)
set ipaPurchase(ApplicationData_IPAPurchase value) => $_setField(27, value); set ipaPurchase(ApplicationData_IPAPurchase value) => $_setField(27, value);
@$pb.TagNumber(27) @$pb.TagNumber(27)
$core.bool hasIpaPurchase() => $_has(22); $core.bool hasIpaPurchase() => $_has(14);
@$pb.TagNumber(27) @$pb.TagNumber(27)
void clearIpaPurchase() => $_clearField(27); void clearIpaPurchase() => $_clearField(27);
@$pb.TagNumber(27) @$pb.TagNumber(27)
ApplicationData_IPAPurchase ensureIpaPurchase() => $_ensure(22); ApplicationData_IPAPurchase ensureIpaPurchase() => $_ensure(14);
@$pb.TagNumber(28) @$pb.TagNumber(28)
ApplicationData_IPAForceCheck get ipaForceCheck => $_getN(23); ApplicationData_IPAForceCheck get ipaForceCheck => $_getN(15);
@$pb.TagNumber(28) @$pb.TagNumber(28)
set ipaForceCheck(ApplicationData_IPAForceCheck value) => set ipaForceCheck(ApplicationData_IPAForceCheck value) =>
$_setField(28, value); $_setField(28, value);
@$pb.TagNumber(28) @$pb.TagNumber(28)
$core.bool hasIpaForceCheck() => $_has(23); $core.bool hasIpaForceCheck() => $_has(15);
@$pb.TagNumber(28) @$pb.TagNumber(28)
void clearIpaForceCheck() => $_clearField(28); void clearIpaForceCheck() => $_clearField(28);
@$pb.TagNumber(28) @$pb.TagNumber(28)
ApplicationData_IPAForceCheck ensureIpaForceCheck() => $_ensure(23); ApplicationData_IPAForceCheck ensureIpaForceCheck() => $_ensure(15);
@$pb.TagNumber(29) @$pb.TagNumber(29)
ApplicationData_AddAdditionalUser get addAdditionalUser => $_getN(24); ApplicationData_AddAdditionalUser get addAdditionalUser => $_getN(16);
@$pb.TagNumber(29) @$pb.TagNumber(29)
set addAdditionalUser(ApplicationData_AddAdditionalUser value) => set addAdditionalUser(ApplicationData_AddAdditionalUser value) =>
$_setField(29, value); $_setField(29, value);
@$pb.TagNumber(29) @$pb.TagNumber(29)
$core.bool hasAddAdditionalUser() => $_has(24); $core.bool hasAddAdditionalUser() => $_has(16);
@$pb.TagNumber(29) @$pb.TagNumber(29)
void clearAddAdditionalUser() => $_clearField(29); void clearAddAdditionalUser() => $_clearField(29);
@$pb.TagNumber(29) @$pb.TagNumber(29)
ApplicationData_AddAdditionalUser ensureAddAdditionalUser() => $_ensure(24); ApplicationData_AddAdditionalUser ensureAddAdditionalUser() => $_ensure(16);
@$pb.TagNumber(30) @$pb.TagNumber(30)
ApplicationData_SetLoginToken get setLoginToken => $_getN(25); ApplicationData_SetLoginToken get setLoginToken => $_getN(17);
@$pb.TagNumber(30) @$pb.TagNumber(30)
set setLoginToken(ApplicationData_SetLoginToken value) => set setLoginToken(ApplicationData_SetLoginToken value) =>
$_setField(30, value); $_setField(30, value);
@$pb.TagNumber(30) @$pb.TagNumber(30)
$core.bool hasSetLoginToken() => $_has(25); $core.bool hasSetLoginToken() => $_has(17);
@$pb.TagNumber(30) @$pb.TagNumber(30)
void clearSetLoginToken() => $_clearField(30); void clearSetLoginToken() => $_clearField(30);
@$pb.TagNumber(30) @$pb.TagNumber(30)
ApplicationData_SetLoginToken ensureSetLoginToken() => $_ensure(25); ApplicationData_SetLoginToken ensureSetLoginToken() => $_ensure(17);
@$pb.TagNumber(31) @$pb.TagNumber(31)
ApplicationData_RegisterPasswordLessRecovery ApplicationData_RegisterPasswordLessRecovery
get registerPasswordlessRecovery => $_getN(26); get registerPasswordlessRecovery => $_getN(18);
@$pb.TagNumber(31) @$pb.TagNumber(31)
set registerPasswordlessRecovery( set registerPasswordlessRecovery(
ApplicationData_RegisterPasswordLessRecovery value) => ApplicationData_RegisterPasswordLessRecovery value) =>
$_setField(31, value); $_setField(31, value);
@$pb.TagNumber(31) @$pb.TagNumber(31)
$core.bool hasRegisterPasswordlessRecovery() => $_has(26); $core.bool hasRegisterPasswordlessRecovery() => $_has(18);
@$pb.TagNumber(31) @$pb.TagNumber(31)
void clearRegisterPasswordlessRecovery() => $_clearField(31); void clearRegisterPasswordlessRecovery() => $_clearField(31);
@$pb.TagNumber(31) @$pb.TagNumber(31)
ApplicationData_RegisterPasswordLessRecovery ApplicationData_RegisterPasswordLessRecovery
ensureRegisterPasswordlessRecovery() => $_ensure(26); ensureRegisterPasswordlessRecovery() => $_ensure(18);
@$pb.TagNumber(32) @$pb.TagNumber(32)
ApplicationData_PasswordlessNotification get passwordlessNotification => ApplicationData_PasswordlessNotification get passwordlessNotification =>
$_getN(27); $_getN(19);
@$pb.TagNumber(32) @$pb.TagNumber(32)
set passwordlessNotification( set passwordlessNotification(
ApplicationData_PasswordlessNotification value) => ApplicationData_PasswordlessNotification value) =>
$_setField(32, value); $_setField(32, value);
@$pb.TagNumber(32) @$pb.TagNumber(32)
$core.bool hasPasswordlessNotification() => $_has(27); $core.bool hasPasswordlessNotification() => $_has(19);
@$pb.TagNumber(32) @$pb.TagNumber(32)
void clearPasswordlessNotification() => $_clearField(32); void clearPasswordlessNotification() => $_clearField(32);
@$pb.TagNumber(32) @$pb.TagNumber(32)
ApplicationData_PasswordlessNotification ensurePasswordlessNotification() => ApplicationData_PasswordlessNotification ensurePasswordlessNotification() =>
$_ensure(27); $_ensure(19);
@$pb.TagNumber(33) @$pb.TagNumber(33)
ApplicationData_RequestMemoriesUpload get requestMemoriesUpload => $_getN(28); ApplicationData_RequestMemoriesUpload get requestMemoriesUpload => $_getN(20);
@$pb.TagNumber(33) @$pb.TagNumber(33)
set requestMemoriesUpload(ApplicationData_RequestMemoriesUpload value) => set requestMemoriesUpload(ApplicationData_RequestMemoriesUpload value) =>
$_setField(33, value); $_setField(33, value);
@$pb.TagNumber(33) @$pb.TagNumber(33)
$core.bool hasRequestMemoriesUpload() => $_has(28); $core.bool hasRequestMemoriesUpload() => $_has(20);
@$pb.TagNumber(33) @$pb.TagNumber(33)
void clearRequestMemoriesUpload() => $_clearField(33); void clearRequestMemoriesUpload() => $_clearField(33);
@$pb.TagNumber(33) @$pb.TagNumber(33)
ApplicationData_RequestMemoriesUpload ensureRequestMemoriesUpload() => ApplicationData_RequestMemoriesUpload ensureRequestMemoriesUpload() =>
$_ensure(28); $_ensure(20);
@$pb.TagNumber(34) @$pb.TagNumber(34)
ApplicationData_ConfirmMemoriesUpload get confirmMemoriesUpload => $_getN(29); ApplicationData_ConfirmMemoriesUpload get confirmMemoriesUpload => $_getN(21);
@$pb.TagNumber(34) @$pb.TagNumber(34)
set confirmMemoriesUpload(ApplicationData_ConfirmMemoriesUpload value) => set confirmMemoriesUpload(ApplicationData_ConfirmMemoriesUpload value) =>
$_setField(34, value); $_setField(34, value);
@$pb.TagNumber(34) @$pb.TagNumber(34)
$core.bool hasConfirmMemoriesUpload() => $_has(29); $core.bool hasConfirmMemoriesUpload() => $_has(21);
@$pb.TagNumber(34) @$pb.TagNumber(34)
void clearConfirmMemoriesUpload() => $_clearField(34); void clearConfirmMemoriesUpload() => $_clearField(34);
@$pb.TagNumber(34) @$pb.TagNumber(34)
ApplicationData_ConfirmMemoriesUpload ensureConfirmMemoriesUpload() => ApplicationData_ConfirmMemoriesUpload ensureConfirmMemoriesUpload() =>
$_ensure(29); $_ensure(21);
@$pb.TagNumber(35) @$pb.TagNumber(35)
ApplicationData_GetMemoriesList get getMemoriesList => $_getN(30); ApplicationData_GetMemoriesList get getMemoriesList => $_getN(22);
@$pb.TagNumber(35) @$pb.TagNumber(35)
set getMemoriesList(ApplicationData_GetMemoriesList value) => set getMemoriesList(ApplicationData_GetMemoriesList value) =>
$_setField(35, value); $_setField(35, value);
@$pb.TagNumber(35) @$pb.TagNumber(35)
$core.bool hasGetMemoriesList() => $_has(30); $core.bool hasGetMemoriesList() => $_has(22);
@$pb.TagNumber(35) @$pb.TagNumber(35)
void clearGetMemoriesList() => $_clearField(35); void clearGetMemoriesList() => $_clearField(35);
@$pb.TagNumber(35) @$pb.TagNumber(35)
ApplicationData_GetMemoriesList ensureGetMemoriesList() => $_ensure(30); ApplicationData_GetMemoriesList ensureGetMemoriesList() => $_ensure(22);
@$pb.TagNumber(36) @$pb.TagNumber(36)
ApplicationData_GetMemoriesUrl get getMemoriesUrl => $_getN(31); ApplicationData_GetMemoriesUrl get getMemoriesUrl => $_getN(23);
@$pb.TagNumber(36) @$pb.TagNumber(36)
set getMemoriesUrl(ApplicationData_GetMemoriesUrl value) => set getMemoriesUrl(ApplicationData_GetMemoriesUrl value) =>
$_setField(36, value); $_setField(36, value);
@$pb.TagNumber(36) @$pb.TagNumber(36)
$core.bool hasGetMemoriesUrl() => $_has(31); $core.bool hasGetMemoriesUrl() => $_has(23);
@$pb.TagNumber(36) @$pb.TagNumber(36)
void clearGetMemoriesUrl() => $_clearField(36); void clearGetMemoriesUrl() => $_clearField(36);
@$pb.TagNumber(36) @$pb.TagNumber(36)
ApplicationData_GetMemoriesUrl ensureGetMemoriesUrl() => $_ensure(31); ApplicationData_GetMemoriesUrl ensureGetMemoriesUrl() => $_ensure(23);
@$pb.TagNumber(37) @$pb.TagNumber(37)
ApplicationData_GetMemoriesUsage get getMemoriesUsage => $_getN(32); ApplicationData_GetMemoriesUsage get getMemoriesUsage => $_getN(24);
@$pb.TagNumber(37) @$pb.TagNumber(37)
set getMemoriesUsage(ApplicationData_GetMemoriesUsage value) => set getMemoriesUsage(ApplicationData_GetMemoriesUsage value) =>
$_setField(37, value); $_setField(37, value);
@$pb.TagNumber(37) @$pb.TagNumber(37)
$core.bool hasGetMemoriesUsage() => $_has(32); $core.bool hasGetMemoriesUsage() => $_has(24);
@$pb.TagNumber(37) @$pb.TagNumber(37)
void clearGetMemoriesUsage() => $_clearField(37); void clearGetMemoriesUsage() => $_clearField(37);
@$pb.TagNumber(37) @$pb.TagNumber(37)
ApplicationData_GetMemoriesUsage ensureGetMemoriesUsage() => $_ensure(32); ApplicationData_GetMemoriesUsage ensureGetMemoriesUsage() => $_ensure(24);
@$pb.TagNumber(38) @$pb.TagNumber(38)
ApplicationData_DeleteMemory get deleteMemory => $_getN(33); ApplicationData_DeleteMemory get deleteMemory => $_getN(25);
@$pb.TagNumber(38) @$pb.TagNumber(38)
set deleteMemory(ApplicationData_DeleteMemory value) => $_setField(38, value); set deleteMemory(ApplicationData_DeleteMemory value) => $_setField(38, value);
@$pb.TagNumber(38) @$pb.TagNumber(38)
$core.bool hasDeleteMemory() => $_has(33); $core.bool hasDeleteMemory() => $_has(25);
@$pb.TagNumber(38) @$pb.TagNumber(38)
void clearDeleteMemory() => $_clearField(38); void clearDeleteMemory() => $_clearField(38);
@$pb.TagNumber(38) @$pb.TagNumber(38)
ApplicationData_DeleteMemory ensureDeleteMemory() => $_ensure(33); ApplicationData_DeleteMemory ensureDeleteMemory() => $_ensure(25);
@$pb.TagNumber(39)
ApplicationData_DisableMemoriesBackup get disableMemoriesBackup => $_getN(26);
@$pb.TagNumber(39)
set disableMemoriesBackup(ApplicationData_DisableMemoriesBackup value) =>
$_setField(39, value);
@$pb.TagNumber(39)
$core.bool hasDisableMemoriesBackup() => $_has(26);
@$pb.TagNumber(39)
void clearDisableMemoriesBackup() => $_clearField(39);
@$pb.TagNumber(39)
ApplicationData_DisableMemoriesBackup ensureDisableMemoriesBackup() =>
$_ensure(26);
} }
class Response_PreKey extends $pb.GeneratedMessage { class Response_PreKey extends $pb.GeneratedMessage {

View file

@ -526,15 +526,6 @@ const ApplicationData$json = {
'9': 0, '9': 0,
'10': 'updateGoogleFcmToken' '10': 'updateGoogleFcmToken'
}, },
{
'1': 'deprecated_9',
'3': 9,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated9'
},
{ {
'1': 'getCurrentPlanInfos', '1': 'getCurrentPlanInfos',
'3': 10, '3': 10,
@ -544,15 +535,6 @@ const ApplicationData$json = {
'9': 0, '9': 0,
'10': 'getCurrentPlanInfos' '10': 'getCurrentPlanInfos'
}, },
{
'1': 'deprecated_11',
'3': 11,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated11'
},
{ {
'1': 'getAvailablePlans', '1': 'getAvailablePlans',
'3': 12, '3': 12,
@ -562,60 +544,6 @@ const ApplicationData$json = {
'9': 0, '9': 0,
'10': 'getAvailablePlans' '10': 'getAvailablePlans'
}, },
{
'1': 'deprecated_13',
'3': 13,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated13'
},
{
'1': 'deprecated_14',
'3': 14,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated14'
},
{
'1': 'deprecated_15',
'3': 15,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated15'
},
{
'1': 'deprecated_16',
'3': 16,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated16'
},
{
'1': 'deprecated_17',
'3': 17,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated17'
},
{
'1': 'deprecated_19',
'3': 19,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated19'
},
{ {
'1': 'downloadDone', '1': 'downloadDone',
'3': 20, '3': 20,
@ -787,6 +715,15 @@ const ApplicationData$json = {
'9': 0, '9': 0,
'10': 'deleteMemory' '10': 'deleteMemory'
}, },
{
'1': 'disable_memories_backup',
'3': 39,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.DisableMemoriesBackup',
'9': 0,
'10': 'disableMemoriesBackup'
},
], ],
'3': [ '3': [
ApplicationData_TextMessage$json, ApplicationData_TextMessage$json,
@ -807,7 +744,6 @@ const ApplicationData$json = {
ApplicationData_DeleteAccount$json, ApplicationData_DeleteAccount$json,
ApplicationData_AddAdditionalUser$json, ApplicationData_AddAdditionalUser$json,
ApplicationData_SetLoginToken$json, ApplicationData_SetLoginToken$json,
ApplicationData_Deprecated$json,
ApplicationData_RegisterPasswordLessRecovery$json, ApplicationData_RegisterPasswordLessRecovery$json,
ApplicationData_PasswordlessNotification$json, ApplicationData_PasswordlessNotification$json,
ApplicationData_RequestMemoriesUpload$json, ApplicationData_RequestMemoriesUpload$json,
@ -815,11 +751,18 @@ const ApplicationData$json = {
ApplicationData_GetMemoriesList$json, ApplicationData_GetMemoriesList$json,
ApplicationData_GetMemoriesUrl$json, ApplicationData_GetMemoriesUrl$json,
ApplicationData_GetMemoriesUsage$json, ApplicationData_GetMemoriesUsage$json,
ApplicationData_DeleteMemory$json ApplicationData_DeleteMemory$json,
ApplicationData_DisableMemoriesBackup$json
], ],
'8': [ '8': [
{'1': 'ApplicationData'}, {'1': 'ApplicationData'},
], ],
'9': [
{'1': 9, '2': 10},
{'1': 11, '2': 12},
{'1': 13, '2': 18},
{'1': 19, '2': 20},
],
}; };
@$core.Deprecated('Use applicationDataDescriptor instead') @$core.Deprecated('Use applicationDataDescriptor instead')
@ -984,11 +927,6 @@ const ApplicationData_SetLoginToken$json = {
], ],
}; };
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_Deprecated$json = {
'1': 'Deprecated',
};
@$core.Deprecated('Use applicationDataDescriptor instead') @$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_RegisterPasswordLessRecovery$json = { const ApplicationData_RegisterPasswordLessRecovery$json = {
'1': 'RegisterPasswordLessRecovery', '1': 'RegisterPasswordLessRecovery',
@ -1079,6 +1017,11 @@ const ApplicationData_DeleteMemory$json = {
], ],
}; };
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_DisableMemoriesBackup$json = {
'1': 'DisableMemoriesBackup',
};
/// Descriptor for `ApplicationData`. Decode as a `google.protobuf.DescriptorProto`. /// Descriptor for `ApplicationData`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode( final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode(
'Cg9BcHBsaWNhdGlvbkRhdGESUQoLdGV4dE1lc3NhZ2UYASABKAsyLS5jbGllbnRfdG9fc2Vydm' 'Cg9BcHBsaWNhdGlvbkRhdGESUQoLdGV4dE1lc3NhZ2UYASABKAsyLS5jbGllbnRfdG9fc2Vydm'
@ -1089,88 +1032,79 @@ final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode(
'VzZXJJZEgAUhJnZXRQcmVrZXlzQnlVc2VySWQSUQoLZ2V0VXNlckJ5SWQYBiABKAsyLS5jbGll' 'VzZXJJZEgAUhJnZXRQcmVrZXlzQnlVc2VySWQSUQoLZ2V0VXNlckJ5SWQYBiABKAsyLS5jbGll'
'bnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5HZXRVc2VyQnlJZEgAUgtnZXRVc2VyQnlJZB' 'bnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5HZXRVc2VyQnlJZEgAUgtnZXRVc2VyQnlJZB'
'JsChR1cGRhdGVHb29nbGVGY21Ub2tlbhgIIAEoCzI2LmNsaWVudF90b19zZXJ2ZXIuQXBwbGlj' 'JsChR1cGRhdGVHb29nbGVGY21Ub2tlbhgIIAEoCzI2LmNsaWVudF90b19zZXJ2ZXIuQXBwbGlj'
'YXRpb25EYXRhLlVwZGF0ZUdvb2dsZUZjbVRva2VuSABSFHVwZGF0ZUdvb2dsZUZjbVRva2VuEl' 'YXRpb25EYXRhLlVwZGF0ZUdvb2dsZUZjbVRva2VuSABSFHVwZGF0ZUdvb2dsZUZjbVRva2VuE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') @$core.Deprecated('Use responseDescriptor instead')
const Response$json = { const Response$json = {

View file

@ -781,6 +781,13 @@ class ApiService {
return sendRequestSync(req); return sendRequestSync(req);
} }
Future<Result> disableMemoriesBackup() async {
final get = ApplicationData_DisableMemoriesBackup();
final appData = ApplicationData()..disableMemoriesBackup = get;
final req = createClientToServerFromApplicationData(appData);
return sendRequestSync(req);
}
Future<int?> getUserIdFromUsername(String username) async { Future<int?> getUserIdFromUsername(String username) async {
final appData = Handshake( final appData = Handshake(
getUseridByUsername: Handshake_GetUserIdByUsername(username: username), getUseridByUsername: Handshake_GetUserIdByUsername(username: username),

View file

@ -63,10 +63,11 @@ class MemoriesCloudService {
Timer? _timer; Timer? _timer;
bool _isProcessing = false; bool _isProcessing = false;
bool get isProcessing => _isProcessing;
final _progressController = final _progressController =
StreamController<MemoriesBackupProgress>.broadcast(); StreamController<MemoriesBackupProgress?>.broadcast();
Stream<MemoriesBackupProgress> get progressStream => Stream<MemoriesBackupProgress?> get progressStream =>
_progressController.stream; _progressController.stream;
MemoriesBackupProgress? _currentProgress; MemoriesBackupProgress? _currentProgress;
@ -97,7 +98,7 @@ class MemoriesCloudService {
currentUploadProgress: currentUploadProgress, currentUploadProgress: currentUploadProgress,
currentMediaId: currentMediaId, currentMediaId: currentMediaId,
); );
_progressController.add(_currentProgress!); _progressController.add(_currentProgress);
} }
Future<void> checkUploads() async { Future<void> checkUploads() async {
@ -152,6 +153,7 @@ class MemoriesCloudService {
} finally { } finally {
_currentProgress = null; _currentProgress = null;
_isProcessing = false; _isProcessing = false;
_progressController.add(null);
} }
} }

View file

@ -1,17 +1,21 @@
import 'dart:async'; import 'dart:async';
import 'package:drift/drift.dart' hide Column;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:twonly/locator.dart'; import 'package:twonly/locator.dart';
import 'package:twonly/src/constants/routes.keys.dart'; import 'package:twonly/src/constants/routes.keys.dart';
import 'package:twonly/src/database/tables/mediafiles.table.dart'; import 'package:twonly/src/database/tables/mediafiles.table.dart';
import 'package:twonly/src/database/twonly.db.dart';
import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart' import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart'
as server; as server;
import 'package:twonly/src/providers/purchases.provider.dart'; import 'package:twonly/src/providers/purchases.provider.dart';
import 'package:twonly/src/services/mediafiles/mediafile.service.dart';
import 'package:twonly/src/services/memories/memories_cloud.service.dart'; import 'package:twonly/src/services/memories/memories_cloud.service.dart';
import 'package:twonly/src/services/subscription.service.dart'; import 'package:twonly/src/services/subscription.service.dart';
import 'package:twonly/src/services/user.service.dart'; import 'package:twonly/src/services/user.service.dart';
import 'package:twonly/src/utils/misc.dart'; import 'package:twonly/src/utils/misc.dart';
import 'package:twonly/src/visual/components/snackbar.dart';
import 'package:twonly/src/visual/elements/my_button.element.dart'; import 'package:twonly/src/visual/elements/my_button.element.dart';
import 'package:twonly/src/visual/views/settings/data_and_storage/storage_contents.view.dart'; import 'package:twonly/src/visual/views/settings/data_and_storage/storage_contents.view.dart';
@ -25,6 +29,7 @@ class ManageStorageView extends StatefulWidget {
class _ManageStorageViewState extends State<ManageStorageView> { class _ManageStorageViewState extends State<ManageStorageView> {
Map<MediaType, int> _stats = {}; Map<MediaType, int> _stats = {};
server.Response_MemoriesUsage? _memoriesUsage; server.Response_MemoriesUsage? _memoriesUsage;
int _cloudOnlyCount = 0;
@override @override
void initState() { void initState() {
@ -35,14 +40,109 @@ class _ManageStorageViewState extends State<ManageStorageView> {
Future<void> _loadStats() async { Future<void> _loadStats() async {
final stats = await twonlyDB.mediaFilesDao.getStorageStats(); final stats = await twonlyDB.mediaFilesDao.getStorageStats();
final memoriesUsage = await apiService.getMemoriesUsage(); final memoriesUsage = await apiService.getMemoriesUsage();
final cloudOnlyCount = await twonlyDB.mediaFilesDao
.getCloudOnlyMemoriesCount();
if (mounted) { if (mounted) {
setState(() { setState(() {
_stats = stats; _stats = stats;
_memoriesUsage = memoriesUsage; _memoriesUsage = memoriesUsage;
_cloudOnlyCount = cloudOnlyCount;
}); });
} }
} }
Future<void> _disableBackup() async {
final confirmed = await showDialog<bool>(
context: context,
builder: (context) => Dialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24),
),
backgroundColor: Theme.of(context).colorScheme.surface,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
context.lang.settingsStorageDisableBackupTitle,
textAlign: TextAlign.center,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
const SizedBox(height: 16),
Text.rich(
TextSpan(
children: formattedText(
context,
context.lang.settingsStorageDisableBackupBody(
_cloudOnlyCount,
),
textColor: Theme.of(
context,
).colorScheme.onSurface.withValues(alpha: 0.8),
),
),
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 15),
),
const SizedBox(height: 24),
Row(
children: [
Expanded(
child: MyButton(
variant: MyButtonVariant.secondaryMiddle,
onPressed: () => Navigator.pop(context, false),
child: Text(context.lang.galleryCancel),
),
),
const SizedBox(width: 12),
Expanded(
child: MyButton(
variant: MyButtonVariant.errorMiddle,
onPressed: () => Navigator.pop(context, true),
child: Text(context.lang.settingsStorageDisableBackupBtn),
),
),
],
),
],
),
),
),
);
if (confirmed == true) {
try {
await apiService.disableMemoriesBackup();
final allMedias = await (twonlyDB.select(
twonlyDB.mediaFiles,
)..where((t) => t.stored.equals(true))).get();
for (final media in allMedias) {
final ms = MediaFileService(media);
if (!ms.storedPath.existsSync()) {
ms.fullMediaRemoval();
await twonlyDB.mediaFilesDao.deleteMediaFile(media.mediaId);
}
}
await twonlyDB.mediaFilesDao.updateAllMediaFiles(
const MediaFilesCompanion(
cloudState: Value(CloudState.none),
),
);
await UserService.update((u) => u.isCloudBackupEnabled = false);
await _loadStats();
} catch (e) {
if (mounted) {
showSnackbar(context, e.toString());
}
}
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final currentPlan = context.watch<PurchasesProvider>().plan; final currentPlan = context.watch<PurchasesProvider>().plan;
@ -207,20 +307,24 @@ class _ManageStorageViewState extends State<ManageStorageView> {
), ),
), ),
), ),
StreamBuilder<MemoriesBackupProgress>( StreamBuilder<MemoriesBackupProgress?>(
initialData: memoriesCloudService.currentProgress, initialData: memoriesCloudService.currentProgress,
stream: memoriesCloudService.progressStream, stream: memoriesCloudService.progressStream,
builder: (context, snapshot) { builder: (context, snapshot) {
final progress = snapshot.data; final progress = snapshot.data;
if (progress == null || progress.totalPending == 0) { final isSyncing =
return const SizedBox.shrink(); progress != null && progress.totalPending > 0;
} final percent = isSyncing
final percent = ? ((progress.currentUploaded / progress.totalPending) +
(progress.currentUploaded / progress.totalPending) + (progress.currentUploadProgress /
(progress.currentUploadProgress / progress.totalPending); progress.totalPending))
.clamp(0.0, 1.0)
: 0.0;
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
if (isSyncing) ...[
const SizedBox(height: 12), const SizedBox(height: 12),
Text( Text(
'Syncing: ${progress.currentUploaded} / ${progress.totalPending} files (${(percent * 100).toStringAsFixed(1)}%)', 'Syncing: ${progress.currentUploaded} / ${progress.totalPending} files (${(percent * 100).toStringAsFixed(1)}%)',
@ -228,7 +332,59 @@ class _ManageStorageViewState extends State<ManageStorageView> {
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
LinearProgressIndicator( LinearProgressIndicator(
value: percent.clamp(0.0, 1.0), value: percent,
),
],
const SizedBox(height: 16),
Align(
child: MyButton(
variant: MyButtonVariant.primaryDense,
onPressed: isSyncing
? null
: () async {
final memories = await twonlyDB.mediaFilesDao
.getMemoriesToBackup();
if (memories.isEmpty) {
if (context.mounted) {
showSnackbar(
context,
context
.lang
.settingsStorageSyncUpToDate,
);
}
} else {
unawaited(
memoriesCloudService.checkUploads(),
);
}
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.sync, size: 18),
const SizedBox(width: 8),
Text(context.lang.settingsStorageSyncNow),
],
),
),
),
const SizedBox(height: 12),
Align(
child: MyButton(
variant: MyButtonVariant.secondaryDense,
onPressed: _disableBackup,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.cloud_off_outlined, size: 18),
const SizedBox(width: 8),
Text(
context.lang.settingsStorageDisableBackupAction,
),
],
),
),
), ),
], ],
); );

View file

@ -60,8 +60,7 @@ class _StorageContentsViewState extends State<StorageContentsView> {
switch (_sortOption) { switch (_sortOption) {
case StorageSortOption.size: case StorageSortOption.size:
storedFiles.sort( storedFiles.sort(
(a, b) => (a, b) => (b.sizeInBytes ?? 0).compareTo(a.sizeInBytes ?? 0),
(b.sizeInBytes ?? 0).compareTo(a.sizeInBytes ?? 0),
); );
case StorageSortOption.newest: case StorageSortOption.newest:
storedFiles.sort((a, b) => b.createdAt.compareTo(a.createdAt)); storedFiles.sort((a, b) => b.createdAt.compareTo(a.createdAt));
@ -83,7 +82,9 @@ class _StorageContentsViewState extends State<StorageContentsView> {
: null, : null,
title: isSelecting title: isSelecting
? Text( ? Text(
context.lang.memoriesSelectedCount(_selectedMediaIds.length), context.lang.memoriesSelectedCount(
_selectedMediaIds.length,
),
style: const TextStyle(fontWeight: FontWeight.bold), style: const TextStyle(fontWeight: FontWeight.bold),
) )
: Text(context.lang.settingsStorageContents), : Text(context.lang.settingsStorageContents),
@ -103,10 +104,9 @@ class _StorageContentsViewState extends State<StorageContentsView> {
? Center( ? Center(
child: Text( child: Text(
context.lang.settingsStorageNoContents, context.lang.settingsStorageNoContents,
style: Theme.of(context) style: Theme.of(
.textTheme context,
.bodyLarge ).textTheme.bodyLarge?.copyWith(color: Colors.grey),
?.copyWith(color: Colors.grey),
), ),
) )
: Column( : Column(
@ -183,8 +183,8 @@ class _StorageContentsViewState extends State<StorageContentsView> {
final isSelecting = _selectedMediaIds.isNotEmpty; final isSelecting = _selectedMediaIds.isNotEmpty;
final ms = MediaFileService(file); final ms = MediaFileService(file);
final hasStored = file.stored || final isLocal =
(ms.storedPath.existsSync() && ms.storedPath.lengthSync() > 0); ms.storedPath.existsSync() && ms.storedPath.lengthSync() > 0;
final IconData statusIcon; final IconData statusIcon;
final String statusText; final String statusText;
@ -197,7 +197,7 @@ class _StorageContentsViewState extends State<StorageContentsView> {
statusIcon = Icons.cloud_upload_outlined; statusIcon = Icons.cloud_upload_outlined;
statusText = context.lang.settingsStorageLocalOnly; statusText = context.lang.settingsStorageLocalOnly;
case CloudState.uploaded: case CloudState.uploaded:
if (hasStored) { if (isLocal) {
statusIcon = Icons.cloud_done_outlined; statusIcon = Icons.cloud_done_outlined;
statusText = context.lang.settingsStorageLocalAndCloud; statusText = context.lang.settingsStorageLocalAndCloud;
} else { } else {
@ -260,16 +260,14 @@ class _StorageContentsViewState extends State<StorageContentsView> {
final ms = MediaFileService(file); final ms = MediaFileService(file);
final isVideo = file.type == MediaType.video; final isVideo = file.type == MediaType.video;
final imgFile = ms.thumbnailPath.existsSync() && final imgFile =
ms.thumbnailPath.lengthSync() > 0 ms.thumbnailPath.existsSync() && ms.thumbnailPath.lengthSync() > 0
? ms.thumbnailPath ? ms.thumbnailPath
: ((file.type == MediaType.image || file.type == MediaType.gif) && : ((file.type == MediaType.image || file.type == MediaType.gif) &&
ms.storedPath.existsSync() && ms.storedPath.existsSync() &&
ms.storedPath.lengthSync() > 0) ms.storedPath.lengthSync() > 0)
? ms.storedPath ? ms.storedPath
: (ms.tempPath.existsSync() && : (ms.tempPath.existsSync() && ms.tempPath.lengthSync() > 0 && !isVideo)
ms.tempPath.lengthSync() > 0 &&
!isVideo)
? ms.tempPath ? ms.tempPath
: null; : null;
@ -296,8 +294,7 @@ class _StorageContentsViewState extends State<StorageContentsView> {
: file.blurhash != null : file.blurhash != null
? BlurHash( ? BlurHash(
hash: file.blurhash!, hash: file.blurhash!,
optimizationMode: optimizationMode: BlurHashOptimizationMode.approximation,
BlurHashOptimizationMode.approximation,
) )
: const Icon( : const Icon(
Icons.image_outlined, Icons.image_outlined,
@ -336,11 +333,12 @@ class _StorageContentsViewState extends State<StorageContentsView> {
if (deleteCompletely == null) return; if (deleteCompletely == null) return;
try { try {
MediaFileService(file).fullMediaRemoval();
await twonlyDB.mediaFilesDao.deleteMediaFile(file.mediaId);
if (deleteCompletely) { if (deleteCompletely) {
await twonlyDB.mediaFilesDao.deleteMediaFile(file.mediaId);
unawaited(apiService.deleteMemory(file.mediaId)); unawaited(apiService.deleteMemory(file.mediaId));
MediaFileService(file).fullMediaRemoval();
} else {
MediaFileService(file).storedPath.deleteSync();
} }
if (context.mounted) { if (context.mounted) {
@ -360,15 +358,19 @@ class _StorageContentsViewState extends State<StorageContentsView> {
} }
} }
Future<void> _batchDelete(BuildContext context, List<MediaFile> allFiles) async { Future<void> _batchDelete(
BuildContext context,
List<MediaFile> allFiles,
) async {
final selectedCount = _selectedMediaIds.length; final selectedCount = _selectedMediaIds.length;
if (selectedCount == 0) return; if (selectedCount == 0) return;
final selectedFiles = allFiles final selectedFiles = allFiles
.where((file) => _selectedMediaIds.contains(file.mediaId)) .where((file) => _selectedMediaIds.contains(file.mediaId))
.toList(); .toList();
final hasAnyCloudBackup = final hasAnyCloudBackup = selectedFiles.any(
selectedFiles.any((file) => file.cloudState == CloudState.uploaded); (file) => file.cloudState == CloudState.uploaded,
);
final deleteCompletely = await showDeleteMemoriesDialog( final deleteCompletely = await showDeleteMemoriesDialog(
context: context, context: context,
@ -380,11 +382,12 @@ class _StorageContentsViewState extends State<StorageContentsView> {
try { try {
for (final file in selectedFiles) { for (final file in selectedFiles) {
MediaFileService(file).fullMediaRemoval();
await twonlyDB.mediaFilesDao.deleteMediaFile(file.mediaId);
if (deleteCompletely) { if (deleteCompletely) {
await twonlyDB.mediaFilesDao.deleteMediaFile(file.mediaId);
unawaited(apiService.deleteMemory(file.mediaId)); unawaited(apiService.deleteMemory(file.mediaId));
MediaFileService(file).fullMediaRemoval();
} else {
MediaFileService(file).storedPath.deleteSync();
} }
} }