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();
}
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:
/// **'Local only'**
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

View file

@ -2448,4 +2448,31 @@ class AppLocalizationsDe extends AppLocalizations {
@override
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
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);
}
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
extends $pb.GeneratedMessage {
factory ApplicationData_RegisterPasswordLessRecovery({
@ -3054,23 +3013,59 @@ class ApplicationData_DeleteMemory extends $pb.GeneratedMessage {
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 {
textMessage,
getUserByUsername,
getPrekeysByUserId,
getUserById,
updateGoogleFcmToken,
deprecated9,
getCurrentPlanInfos,
deprecated11,
getAvailablePlans,
deprecated13,
deprecated14,
deprecated15,
deprecated16,
deprecated17,
removeAdditionalUser,
deprecated19,
downloadDone,
getSignedPrekeyByUserid,
updateSignedPrekey,
@ -3089,6 +3084,7 @@ enum ApplicationData_ApplicationData {
getMemoriesUrl,
getMemoriesUsage,
deleteMemory,
disableMemoriesBackup,
notSet
}
@ -3099,17 +3095,9 @@ class ApplicationData extends $pb.GeneratedMessage {
ApplicationData_GetPrekeysByUserId? getPrekeysByUserId,
ApplicationData_GetUserById? getUserById,
ApplicationData_UpdateGoogleFcmToken? updateGoogleFcmToken,
ApplicationData_Deprecated? deprecated9,
ApplicationData_GetCurrentPlanInfos? getCurrentPlanInfos,
ApplicationData_Deprecated? deprecated11,
ApplicationData_GetAvailablePlans? getAvailablePlans,
ApplicationData_Deprecated? deprecated13,
ApplicationData_Deprecated? deprecated14,
ApplicationData_Deprecated? deprecated15,
ApplicationData_Deprecated? deprecated16,
ApplicationData_Deprecated? deprecated17,
ApplicationData_RemoveAdditionalUser? removeAdditionalUser,
ApplicationData_Deprecated? deprecated19,
ApplicationData_DownloadDone? downloadDone,
ApplicationData_GetSignedPreKeyByUserId? getSignedPrekeyByUserid,
ApplicationData_UpdateSignedPreKey? updateSignedPrekey,
@ -3128,6 +3116,7 @@ class ApplicationData extends $pb.GeneratedMessage {
ApplicationData_GetMemoriesUrl? getMemoriesUrl,
ApplicationData_GetMemoriesUsage? getMemoriesUsage,
ApplicationData_DeleteMemory? deleteMemory,
ApplicationData_DisableMemoriesBackup? disableMemoriesBackup,
}) {
final result = create();
if (textMessage != null) result.textMessage = textMessage;
@ -3137,19 +3126,11 @@ class ApplicationData extends $pb.GeneratedMessage {
if (getUserById != null) result.getUserById = getUserById;
if (updateGoogleFcmToken != null)
result.updateGoogleFcmToken = updateGoogleFcmToken;
if (deprecated9 != null) result.deprecated9 = deprecated9;
if (getCurrentPlanInfos != null)
result.getCurrentPlanInfos = getCurrentPlanInfos;
if (deprecated11 != null) result.deprecated11 = deprecated11;
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)
result.removeAdditionalUser = removeAdditionalUser;
if (deprecated19 != null) result.deprecated19 = deprecated19;
if (downloadDone != null) result.downloadDone = downloadDone;
if (getSignedPrekeyByUserid != null)
result.getSignedPrekeyByUserid = getSignedPrekeyByUserid;
@ -3174,6 +3155,8 @@ class ApplicationData extends $pb.GeneratedMessage {
if (getMemoriesUrl != null) result.getMemoriesUrl = getMemoriesUrl;
if (getMemoriesUsage != null) result.getMemoriesUsage = getMemoriesUsage;
if (deleteMemory != null) result.deleteMemory = deleteMemory;
if (disableMemoriesBackup != null)
result.disableMemoriesBackup = disableMemoriesBackup;
return result;
}
@ -3193,17 +3176,9 @@ class ApplicationData extends $pb.GeneratedMessage {
3: ApplicationData_ApplicationData.getPrekeysByUserId,
6: ApplicationData_ApplicationData.getUserById,
8: ApplicationData_ApplicationData.updateGoogleFcmToken,
9: ApplicationData_ApplicationData.deprecated9,
10: ApplicationData_ApplicationData.getCurrentPlanInfos,
11: ApplicationData_ApplicationData.deprecated11,
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,
19: ApplicationData_ApplicationData.deprecated19,
20: ApplicationData_ApplicationData.downloadDone,
22: ApplicationData_ApplicationData.getSignedPrekeyByUserid,
23: ApplicationData_ApplicationData.updateSignedPrekey,
@ -3222,6 +3197,7 @@ class ApplicationData extends $pb.GeneratedMessage {
36: ApplicationData_ApplicationData.getMemoriesUrl,
37: ApplicationData_ApplicationData.getMemoriesUsage,
38: ApplicationData_ApplicationData.deleteMemory,
39: ApplicationData_ApplicationData.disableMemoriesBackup,
0: ApplicationData_ApplicationData.notSet
};
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
@ -3235,17 +3211,9 @@ class ApplicationData extends $pb.GeneratedMessage {
3,
6,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
22,
23,
@ -3263,7 +3231,8 @@ class ApplicationData extends $pb.GeneratedMessage {
35,
36,
37,
38
38,
39
])
..aOM<ApplicationData_TextMessage>(1, _omitFieldNames ? '' : 'textMessage',
protoName: 'textMessage',
@ -3283,42 +3252,18 @@ class ApplicationData extends $pb.GeneratedMessage {
8, _omitFieldNames ? '' : 'updateGoogleFcmToken',
protoName: 'updateGoogleFcmToken',
subBuilder: ApplicationData_UpdateGoogleFcmToken.create)
..aOM<ApplicationData_Deprecated>(9, _omitFieldNames ? '' : 'deprecated9',
protoName: 'deprecated_9',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_GetCurrentPlanInfos>(
10, _omitFieldNames ? '' : 'getCurrentPlanInfos',
protoName: 'getCurrentPlanInfos',
subBuilder: ApplicationData_GetCurrentPlanInfos.create)
..aOM<ApplicationData_Deprecated>(11, _omitFieldNames ? '' : 'deprecated11',
protoName: 'deprecated_11',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_GetAvailablePlans>(
12, _omitFieldNames ? '' : 'getAvailablePlans',
protoName: 'getAvailablePlans',
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>(
18, _omitFieldNames ? '' : 'removeAdditionalUser',
protoName: 'removeAdditionalUser',
subBuilder: ApplicationData_RemoveAdditionalUser.create)
..aOM<ApplicationData_Deprecated>(19, _omitFieldNames ? '' : 'deprecated19',
protoName: 'deprecated_19',
subBuilder: ApplicationData_Deprecated.create)
..aOM<ApplicationData_DownloadDone>(
20, _omitFieldNames ? '' : 'downloadDone',
protoName: 'downloadDone',
@ -3379,6 +3324,9 @@ class ApplicationData extends $pb.GeneratedMessage {
..aOM<ApplicationData_DeleteMemory>(
38, _omitFieldNames ? '' : 'deleteMemory',
subBuilder: ApplicationData_DeleteMemory.create)
..aOM<ApplicationData_DisableMemoriesBackup>(
39, _omitFieldNames ? '' : 'disableMemoriesBackup',
subBuilder: ApplicationData_DisableMemoriesBackup.create)
..hasRequiredFields = false;
@$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(6)
@$pb.TagNumber(8)
@$pb.TagNumber(9)
@$pb.TagNumber(10)
@$pb.TagNumber(11)
@$pb.TagNumber(12)
@$pb.TagNumber(13)
@$pb.TagNumber(14)
@$pb.TagNumber(15)
@$pb.TagNumber(16)
@$pb.TagNumber(17)
@$pb.TagNumber(18)
@$pb.TagNumber(19)
@$pb.TagNumber(20)
@$pb.TagNumber(22)
@$pb.TagNumber(23)
@ -3434,6 +3374,7 @@ class ApplicationData extends $pb.GeneratedMessage {
@$pb.TagNumber(36)
@$pb.TagNumber(37)
@$pb.TagNumber(38)
@$pb.TagNumber(39)
ApplicationData_ApplicationData whichApplicationData() =>
_ApplicationData_ApplicationDataByTag[$_whichOneof(0)]!;
@$pb.TagNumber(1)
@ -3441,17 +3382,9 @@ class ApplicationData extends $pb.GeneratedMessage {
@$pb.TagNumber(3)
@$pb.TagNumber(6)
@$pb.TagNumber(8)
@$pb.TagNumber(9)
@$pb.TagNumber(10)
@$pb.TagNumber(11)
@$pb.TagNumber(12)
@$pb.TagNumber(13)
@$pb.TagNumber(14)
@$pb.TagNumber(15)
@$pb.TagNumber(16)
@$pb.TagNumber(17)
@$pb.TagNumber(18)
@$pb.TagNumber(19)
@$pb.TagNumber(20)
@$pb.TagNumber(22)
@$pb.TagNumber(23)
@ -3470,6 +3403,7 @@ class ApplicationData extends $pb.GeneratedMessage {
@$pb.TagNumber(36)
@$pb.TagNumber(37)
@$pb.TagNumber(38)
@$pb.TagNumber(39)
void clearApplicationData() => $_clearField($_whichOneof(0));
@$pb.TagNumber(1)
@ -3531,353 +3465,278 @@ class ApplicationData extends $pb.GeneratedMessage {
ApplicationData_UpdateGoogleFcmToken ensureUpdateGoogleFcmToken() =>
$_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)
ApplicationData_GetCurrentPlanInfos get getCurrentPlanInfos => $_getN(6);
ApplicationData_GetCurrentPlanInfos get getCurrentPlanInfos => $_getN(5);
@$pb.TagNumber(10)
set getCurrentPlanInfos(ApplicationData_GetCurrentPlanInfos value) =>
$_setField(10, value);
@$pb.TagNumber(10)
$core.bool hasGetCurrentPlanInfos() => $_has(6);
$core.bool hasGetCurrentPlanInfos() => $_has(5);
@$pb.TagNumber(10)
void clearGetCurrentPlanInfos() => $_clearField(10);
@$pb.TagNumber(10)
ApplicationData_GetCurrentPlanInfos ensureGetCurrentPlanInfos() =>
$_ensure(6);
@$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);
$_ensure(5);
@$pb.TagNumber(12)
ApplicationData_GetAvailablePlans get getAvailablePlans => $_getN(8);
ApplicationData_GetAvailablePlans get getAvailablePlans => $_getN(6);
@$pb.TagNumber(12)
set getAvailablePlans(ApplicationData_GetAvailablePlans value) =>
$_setField(12, value);
@$pb.TagNumber(12)
$core.bool hasGetAvailablePlans() => $_has(8);
$core.bool hasGetAvailablePlans() => $_has(6);
@$pb.TagNumber(12)
void clearGetAvailablePlans() => $_clearField(12);
@$pb.TagNumber(12)
ApplicationData_GetAvailablePlans ensureGetAvailablePlans() => $_ensure(8);
@$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);
ApplicationData_GetAvailablePlans ensureGetAvailablePlans() => $_ensure(6);
@$pb.TagNumber(18)
ApplicationData_RemoveAdditionalUser get removeAdditionalUser => $_getN(14);
ApplicationData_RemoveAdditionalUser get removeAdditionalUser => $_getN(7);
@$pb.TagNumber(18)
set removeAdditionalUser(ApplicationData_RemoveAdditionalUser value) =>
$_setField(18, value);
@$pb.TagNumber(18)
$core.bool hasRemoveAdditionalUser() => $_has(14);
$core.bool hasRemoveAdditionalUser() => $_has(7);
@$pb.TagNumber(18)
void clearRemoveAdditionalUser() => $_clearField(18);
@$pb.TagNumber(18)
ApplicationData_RemoveAdditionalUser ensureRemoveAdditionalUser() =>
$_ensure(14);
@$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);
$_ensure(7);
@$pb.TagNumber(20)
ApplicationData_DownloadDone get downloadDone => $_getN(16);
ApplicationData_DownloadDone get downloadDone => $_getN(8);
@$pb.TagNumber(20)
set downloadDone(ApplicationData_DownloadDone value) => $_setField(20, value);
@$pb.TagNumber(20)
$core.bool hasDownloadDone() => $_has(16);
$core.bool hasDownloadDone() => $_has(8);
@$pb.TagNumber(20)
void clearDownloadDone() => $_clearField(20);
@$pb.TagNumber(20)
ApplicationData_DownloadDone ensureDownloadDone() => $_ensure(16);
ApplicationData_DownloadDone ensureDownloadDone() => $_ensure(8);
@$pb.TagNumber(22)
ApplicationData_GetSignedPreKeyByUserId get getSignedPrekeyByUserid =>
$_getN(17);
$_getN(9);
@$pb.TagNumber(22)
set getSignedPrekeyByUserid(ApplicationData_GetSignedPreKeyByUserId value) =>
$_setField(22, value);
@$pb.TagNumber(22)
$core.bool hasGetSignedPrekeyByUserid() => $_has(17);
$core.bool hasGetSignedPrekeyByUserid() => $_has(9);
@$pb.TagNumber(22)
void clearGetSignedPrekeyByUserid() => $_clearField(22);
@$pb.TagNumber(22)
ApplicationData_GetSignedPreKeyByUserId ensureGetSignedPrekeyByUserid() =>
$_ensure(17);
$_ensure(9);
@$pb.TagNumber(23)
ApplicationData_UpdateSignedPreKey get updateSignedPrekey => $_getN(18);
ApplicationData_UpdateSignedPreKey get updateSignedPrekey => $_getN(10);
@$pb.TagNumber(23)
set updateSignedPrekey(ApplicationData_UpdateSignedPreKey value) =>
$_setField(23, value);
@$pb.TagNumber(23)
$core.bool hasUpdateSignedPrekey() => $_has(18);
$core.bool hasUpdateSignedPrekey() => $_has(10);
@$pb.TagNumber(23)
void clearUpdateSignedPrekey() => $_clearField(23);
@$pb.TagNumber(23)
ApplicationData_UpdateSignedPreKey ensureUpdateSignedPrekey() => $_ensure(18);
ApplicationData_UpdateSignedPreKey ensureUpdateSignedPrekey() => $_ensure(10);
@$pb.TagNumber(24)
ApplicationData_DeleteAccount get deleteAccount => $_getN(19);
ApplicationData_DeleteAccount get deleteAccount => $_getN(11);
@$pb.TagNumber(24)
set deleteAccount(ApplicationData_DeleteAccount value) =>
$_setField(24, value);
@$pb.TagNumber(24)
$core.bool hasDeleteAccount() => $_has(19);
$core.bool hasDeleteAccount() => $_has(11);
@$pb.TagNumber(24)
void clearDeleteAccount() => $_clearField(24);
@$pb.TagNumber(24)
ApplicationData_DeleteAccount ensureDeleteAccount() => $_ensure(19);
ApplicationData_DeleteAccount ensureDeleteAccount() => $_ensure(11);
@$pb.TagNumber(25)
ApplicationData_ReportUser get reportUser => $_getN(20);
ApplicationData_ReportUser get reportUser => $_getN(12);
@$pb.TagNumber(25)
set reportUser(ApplicationData_ReportUser value) => $_setField(25, value);
@$pb.TagNumber(25)
$core.bool hasReportUser() => $_has(20);
$core.bool hasReportUser() => $_has(12);
@$pb.TagNumber(25)
void clearReportUser() => $_clearField(25);
@$pb.TagNumber(25)
ApplicationData_ReportUser ensureReportUser() => $_ensure(20);
ApplicationData_ReportUser ensureReportUser() => $_ensure(12);
@$pb.TagNumber(26)
ApplicationData_ChangeUsername get changeUsername => $_getN(21);
ApplicationData_ChangeUsername get changeUsername => $_getN(13);
@$pb.TagNumber(26)
set changeUsername(ApplicationData_ChangeUsername value) =>
$_setField(26, value);
@$pb.TagNumber(26)
$core.bool hasChangeUsername() => $_has(21);
$core.bool hasChangeUsername() => $_has(13);
@$pb.TagNumber(26)
void clearChangeUsername() => $_clearField(26);
@$pb.TagNumber(26)
ApplicationData_ChangeUsername ensureChangeUsername() => $_ensure(21);
ApplicationData_ChangeUsername ensureChangeUsername() => $_ensure(13);
@$pb.TagNumber(27)
ApplicationData_IPAPurchase get ipaPurchase => $_getN(22);
ApplicationData_IPAPurchase get ipaPurchase => $_getN(14);
@$pb.TagNumber(27)
set ipaPurchase(ApplicationData_IPAPurchase value) => $_setField(27, value);
@$pb.TagNumber(27)
$core.bool hasIpaPurchase() => $_has(22);
$core.bool hasIpaPurchase() => $_has(14);
@$pb.TagNumber(27)
void clearIpaPurchase() => $_clearField(27);
@$pb.TagNumber(27)
ApplicationData_IPAPurchase ensureIpaPurchase() => $_ensure(22);
ApplicationData_IPAPurchase ensureIpaPurchase() => $_ensure(14);
@$pb.TagNumber(28)
ApplicationData_IPAForceCheck get ipaForceCheck => $_getN(23);
ApplicationData_IPAForceCheck get ipaForceCheck => $_getN(15);
@$pb.TagNumber(28)
set ipaForceCheck(ApplicationData_IPAForceCheck value) =>
$_setField(28, value);
@$pb.TagNumber(28)
$core.bool hasIpaForceCheck() => $_has(23);
$core.bool hasIpaForceCheck() => $_has(15);
@$pb.TagNumber(28)
void clearIpaForceCheck() => $_clearField(28);
@$pb.TagNumber(28)
ApplicationData_IPAForceCheck ensureIpaForceCheck() => $_ensure(23);
ApplicationData_IPAForceCheck ensureIpaForceCheck() => $_ensure(15);
@$pb.TagNumber(29)
ApplicationData_AddAdditionalUser get addAdditionalUser => $_getN(24);
ApplicationData_AddAdditionalUser get addAdditionalUser => $_getN(16);
@$pb.TagNumber(29)
set addAdditionalUser(ApplicationData_AddAdditionalUser value) =>
$_setField(29, value);
@$pb.TagNumber(29)
$core.bool hasAddAdditionalUser() => $_has(24);
$core.bool hasAddAdditionalUser() => $_has(16);
@$pb.TagNumber(29)
void clearAddAdditionalUser() => $_clearField(29);
@$pb.TagNumber(29)
ApplicationData_AddAdditionalUser ensureAddAdditionalUser() => $_ensure(24);
ApplicationData_AddAdditionalUser ensureAddAdditionalUser() => $_ensure(16);
@$pb.TagNumber(30)
ApplicationData_SetLoginToken get setLoginToken => $_getN(25);
ApplicationData_SetLoginToken get setLoginToken => $_getN(17);
@$pb.TagNumber(30)
set setLoginToken(ApplicationData_SetLoginToken value) =>
$_setField(30, value);
@$pb.TagNumber(30)
$core.bool hasSetLoginToken() => $_has(25);
$core.bool hasSetLoginToken() => $_has(17);
@$pb.TagNumber(30)
void clearSetLoginToken() => $_clearField(30);
@$pb.TagNumber(30)
ApplicationData_SetLoginToken ensureSetLoginToken() => $_ensure(25);
ApplicationData_SetLoginToken ensureSetLoginToken() => $_ensure(17);
@$pb.TagNumber(31)
ApplicationData_RegisterPasswordLessRecovery
get registerPasswordlessRecovery => $_getN(26);
get registerPasswordlessRecovery => $_getN(18);
@$pb.TagNumber(31)
set registerPasswordlessRecovery(
ApplicationData_RegisterPasswordLessRecovery value) =>
$_setField(31, value);
@$pb.TagNumber(31)
$core.bool hasRegisterPasswordlessRecovery() => $_has(26);
$core.bool hasRegisterPasswordlessRecovery() => $_has(18);
@$pb.TagNumber(31)
void clearRegisterPasswordlessRecovery() => $_clearField(31);
@$pb.TagNumber(31)
ApplicationData_RegisterPasswordLessRecovery
ensureRegisterPasswordlessRecovery() => $_ensure(26);
ensureRegisterPasswordlessRecovery() => $_ensure(18);
@$pb.TagNumber(32)
ApplicationData_PasswordlessNotification get passwordlessNotification =>
$_getN(27);
$_getN(19);
@$pb.TagNumber(32)
set passwordlessNotification(
ApplicationData_PasswordlessNotification value) =>
$_setField(32, value);
@$pb.TagNumber(32)
$core.bool hasPasswordlessNotification() => $_has(27);
$core.bool hasPasswordlessNotification() => $_has(19);
@$pb.TagNumber(32)
void clearPasswordlessNotification() => $_clearField(32);
@$pb.TagNumber(32)
ApplicationData_PasswordlessNotification ensurePasswordlessNotification() =>
$_ensure(27);
$_ensure(19);
@$pb.TagNumber(33)
ApplicationData_RequestMemoriesUpload get requestMemoriesUpload => $_getN(28);
ApplicationData_RequestMemoriesUpload get requestMemoriesUpload => $_getN(20);
@$pb.TagNumber(33)
set requestMemoriesUpload(ApplicationData_RequestMemoriesUpload value) =>
$_setField(33, value);
@$pb.TagNumber(33)
$core.bool hasRequestMemoriesUpload() => $_has(28);
$core.bool hasRequestMemoriesUpload() => $_has(20);
@$pb.TagNumber(33)
void clearRequestMemoriesUpload() => $_clearField(33);
@$pb.TagNumber(33)
ApplicationData_RequestMemoriesUpload ensureRequestMemoriesUpload() =>
$_ensure(28);
$_ensure(20);
@$pb.TagNumber(34)
ApplicationData_ConfirmMemoriesUpload get confirmMemoriesUpload => $_getN(29);
ApplicationData_ConfirmMemoriesUpload get confirmMemoriesUpload => $_getN(21);
@$pb.TagNumber(34)
set confirmMemoriesUpload(ApplicationData_ConfirmMemoriesUpload value) =>
$_setField(34, value);
@$pb.TagNumber(34)
$core.bool hasConfirmMemoriesUpload() => $_has(29);
$core.bool hasConfirmMemoriesUpload() => $_has(21);
@$pb.TagNumber(34)
void clearConfirmMemoriesUpload() => $_clearField(34);
@$pb.TagNumber(34)
ApplicationData_ConfirmMemoriesUpload ensureConfirmMemoriesUpload() =>
$_ensure(29);
$_ensure(21);
@$pb.TagNumber(35)
ApplicationData_GetMemoriesList get getMemoriesList => $_getN(30);
ApplicationData_GetMemoriesList get getMemoriesList => $_getN(22);
@$pb.TagNumber(35)
set getMemoriesList(ApplicationData_GetMemoriesList value) =>
$_setField(35, value);
@$pb.TagNumber(35)
$core.bool hasGetMemoriesList() => $_has(30);
$core.bool hasGetMemoriesList() => $_has(22);
@$pb.TagNumber(35)
void clearGetMemoriesList() => $_clearField(35);
@$pb.TagNumber(35)
ApplicationData_GetMemoriesList ensureGetMemoriesList() => $_ensure(30);
ApplicationData_GetMemoriesList ensureGetMemoriesList() => $_ensure(22);
@$pb.TagNumber(36)
ApplicationData_GetMemoriesUrl get getMemoriesUrl => $_getN(31);
ApplicationData_GetMemoriesUrl get getMemoriesUrl => $_getN(23);
@$pb.TagNumber(36)
set getMemoriesUrl(ApplicationData_GetMemoriesUrl value) =>
$_setField(36, value);
@$pb.TagNumber(36)
$core.bool hasGetMemoriesUrl() => $_has(31);
$core.bool hasGetMemoriesUrl() => $_has(23);
@$pb.TagNumber(36)
void clearGetMemoriesUrl() => $_clearField(36);
@$pb.TagNumber(36)
ApplicationData_GetMemoriesUrl ensureGetMemoriesUrl() => $_ensure(31);
ApplicationData_GetMemoriesUrl ensureGetMemoriesUrl() => $_ensure(23);
@$pb.TagNumber(37)
ApplicationData_GetMemoriesUsage get getMemoriesUsage => $_getN(32);
ApplicationData_GetMemoriesUsage get getMemoriesUsage => $_getN(24);
@$pb.TagNumber(37)
set getMemoriesUsage(ApplicationData_GetMemoriesUsage value) =>
$_setField(37, value);
@$pb.TagNumber(37)
$core.bool hasGetMemoriesUsage() => $_has(32);
$core.bool hasGetMemoriesUsage() => $_has(24);
@$pb.TagNumber(37)
void clearGetMemoriesUsage() => $_clearField(37);
@$pb.TagNumber(37)
ApplicationData_GetMemoriesUsage ensureGetMemoriesUsage() => $_ensure(32);
ApplicationData_GetMemoriesUsage ensureGetMemoriesUsage() => $_ensure(24);
@$pb.TagNumber(38)
ApplicationData_DeleteMemory get deleteMemory => $_getN(33);
ApplicationData_DeleteMemory get deleteMemory => $_getN(25);
@$pb.TagNumber(38)
set deleteMemory(ApplicationData_DeleteMemory value) => $_setField(38, value);
@$pb.TagNumber(38)
$core.bool hasDeleteMemory() => $_has(33);
$core.bool hasDeleteMemory() => $_has(25);
@$pb.TagNumber(38)
void clearDeleteMemory() => $_clearField(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 {

View file

@ -526,15 +526,6 @@ const ApplicationData$json = {
'9': 0,
'10': 'updateGoogleFcmToken'
},
{
'1': 'deprecated_9',
'3': 9,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated9'
},
{
'1': 'getCurrentPlanInfos',
'3': 10,
@ -544,15 +535,6 @@ const ApplicationData$json = {
'9': 0,
'10': 'getCurrentPlanInfos'
},
{
'1': 'deprecated_11',
'3': 11,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.Deprecated',
'9': 0,
'10': 'deprecated11'
},
{
'1': 'getAvailablePlans',
'3': 12,
@ -562,60 +544,6 @@ const ApplicationData$json = {
'9': 0,
'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',
'3': 20,
@ -787,6 +715,15 @@ const ApplicationData$json = {
'9': 0,
'10': 'deleteMemory'
},
{
'1': 'disable_memories_backup',
'3': 39,
'4': 1,
'5': 11,
'6': '.client_to_server.ApplicationData.DisableMemoriesBackup',
'9': 0,
'10': 'disableMemoriesBackup'
},
],
'3': [
ApplicationData_TextMessage$json,
@ -807,7 +744,6 @@ const ApplicationData$json = {
ApplicationData_DeleteAccount$json,
ApplicationData_AddAdditionalUser$json,
ApplicationData_SetLoginToken$json,
ApplicationData_Deprecated$json,
ApplicationData_RegisterPasswordLessRecovery$json,
ApplicationData_PasswordlessNotification$json,
ApplicationData_RequestMemoriesUpload$json,
@ -815,11 +751,18 @@ const ApplicationData$json = {
ApplicationData_GetMemoriesList$json,
ApplicationData_GetMemoriesUrl$json,
ApplicationData_GetMemoriesUsage$json,
ApplicationData_DeleteMemory$json
ApplicationData_DeleteMemory$json,
ApplicationData_DisableMemoriesBackup$json
],
'8': [
{'1': 'ApplicationData'},
],
'9': [
{'1': 9, '2': 10},
{'1': 11, '2': 12},
{'1': 13, '2': 18},
{'1': 19, '2': 20},
],
};
@$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')
const ApplicationData_RegisterPasswordLessRecovery$json = {
'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`.
final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode(
'Cg9BcHBsaWNhdGlvbkRhdGESUQoLdGV4dE1lc3NhZ2UYASABKAsyLS5jbGllbnRfdG9fc2Vydm'
@ -1089,88 +1032,79 @@ final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode(
'VzZXJJZEgAUhJnZXRQcmVrZXlzQnlVc2VySWQSUQoLZ2V0VXNlckJ5SWQYBiABKAsyLS5jbGll'
'bnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5HZXRVc2VyQnlJZEgAUgtnZXRVc2VyQnlJZB'
'JsChR1cGRhdGVHb29nbGVGY21Ub2tlbhgIIAEoCzI2LmNsaWVudF90b19zZXJ2ZXIuQXBwbGlj'
'YXRpb25EYXRhLlVwZGF0ZUdvb2dsZUZjbVRva2VuSABSFHVwZGF0ZUdvb2dsZUZjbVRva2VuEl'
'EKDGRlcHJlY2F0ZWRfORgJIAEoCzIsLmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRh'
'LkRlcHJlY2F0ZWRIAFILZGVwcmVjYXRlZDkSaQoTZ2V0Q3VycmVudFBsYW5JbmZvcxgKIAEoCz'
'I1LmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRhLkdldEN1cnJlbnRQbGFuSW5mb3NI'
'AFITZ2V0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bmNyeX'
'B0ZWRTZXJ2ZXJLZXkSKwoOcGluVW5sb2NrVG9rZW4YAiABKAxIAFIOcGluVW5sb2NrVG9rZW6I'
'AQFCEQoPX3BpblVubG9ja1Rva2VuGnAKGFBhc3N3b3JkbGVzc05vdGlmaWNhdGlvbhInCg9ub3'
'RpZmljYXRpb25faWQYASABKAlSDm5vdGlmaWNhdGlvbklkEisKEWVuY3J5cHRlZF9tZXNzYWdl'
'GAIgASgMUhBlbmNyeXB0ZWRNZXNzYWdlGmsKFVJlcXVlc3RNZW1vcmllc1VwbG9hZBISCgRzaX'
'plGAEgASgDUgRzaXplEiMKDW9yaWdpbmFsX2RhdGUYAiABKANSDG9yaWdpbmFsRGF0ZRIZCght'
'ZWRpYV9pZBgDIAEoCVIHbWVkaWFJZBoyChVDb25maXJtTWVtb3JpZXNVcGxvYWQSGQoIbWVkaW'
'FfaWQYASABKAlSB21lZGlhSWQaSAoPR2V0TWVtb3JpZXNMaXN0Eh8KC29mZnNldF9kYXRlGAEg'
'ASgDUgpvZmZzZXREYXRlEhQKBWxpbWl0GAIgASgDUgVsaW1pdBpJCg5HZXRNZW1vcmllc1VybB'
'IZCghtZWRpYV9pZBgBIAEoCVIHbWVkaWFJZBIcCgl0aHVtYm5haWwYAiABKAhSCXRodW1ibmFp'
'bBoSChBHZXRNZW1vcmllc1VzYWdlGikKDERlbGV0ZU1lbW9yeRIZCghtZWRpYV9pZBgBIAEoCV'
'IHbWVkaWFJZBoXChVEaXNhYmxlTWVtb3JpZXNCYWNrdXBCEQoPQXBwbGljYXRpb25EYXRhSgQI'
'CRAKSgQICxAMSgQIDRASSgQIExAU');
@$core.Deprecated('Use responseDescriptor instead')
const Response$json = {

View file

@ -781,6 +781,13 @@ class ApiService {
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 {
final appData = Handshake(
getUseridByUsername: Handshake_GetUserIdByUsername(username: username),

View file

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

View file

@ -1,17 +1,21 @@
import 'dart:async';
import 'package:drift/drift.dart' hide Column;
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:provider/provider.dart';
import 'package:twonly/locator.dart';
import 'package:twonly/src/constants/routes.keys.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'
as server;
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/subscription.service.dart';
import 'package:twonly/src/services/user.service.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/views/settings/data_and_storage/storage_contents.view.dart';
@ -25,6 +29,7 @@ class ManageStorageView extends StatefulWidget {
class _ManageStorageViewState extends State<ManageStorageView> {
Map<MediaType, int> _stats = {};
server.Response_MemoriesUsage? _memoriesUsage;
int _cloudOnlyCount = 0;
@override
void initState() {
@ -35,14 +40,109 @@ class _ManageStorageViewState extends State<ManageStorageView> {
Future<void> _loadStats() async {
final stats = await twonlyDB.mediaFilesDao.getStorageStats();
final memoriesUsage = await apiService.getMemoriesUsage();
final cloudOnlyCount = await twonlyDB.mediaFilesDao
.getCloudOnlyMemoriesCount();
if (mounted) {
setState(() {
_stats = stats;
_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
Widget build(BuildContext context) {
final currentPlan = context.watch<PurchasesProvider>().plan;
@ -207,28 +307,84 @@ class _ManageStorageViewState extends State<ManageStorageView> {
),
),
),
StreamBuilder<MemoriesBackupProgress>(
StreamBuilder<MemoriesBackupProgress?>(
initialData: memoriesCloudService.currentProgress,
stream: memoriesCloudService.progressStream,
builder: (context, snapshot) {
final progress = snapshot.data;
if (progress == null || progress.totalPending == 0) {
return const SizedBox.shrink();
}
final percent =
(progress.currentUploaded / progress.totalPending) +
(progress.currentUploadProgress / progress.totalPending);
final isSyncing =
progress != null && progress.totalPending > 0;
final percent = isSyncing
? ((progress.currentUploaded / progress.totalPending) +
(progress.currentUploadProgress /
progress.totalPending))
.clamp(0.0, 1.0)
: 0.0;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const SizedBox(height: 12),
Text(
'Syncing: ${progress.currentUploaded} / ${progress.totalPending} files (${(percent * 100).toStringAsFixed(1)}%)',
style: const TextStyle(fontSize: 14),
if (isSyncing) ...[
const SizedBox(height: 12),
Text(
'Syncing: ${progress.currentUploaded} / ${progress.totalPending} files (${(percent * 100).toStringAsFixed(1)}%)',
style: const TextStyle(fontSize: 14),
),
const SizedBox(height: 6),
LinearProgressIndicator(
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: 6),
LinearProgressIndicator(
value: percent.clamp(0.0, 1.0),
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) {
case StorageSortOption.size:
storedFiles.sort(
(a, b) =>
(b.sizeInBytes ?? 0).compareTo(a.sizeInBytes ?? 0),
(a, b) => (b.sizeInBytes ?? 0).compareTo(a.sizeInBytes ?? 0),
);
case StorageSortOption.newest:
storedFiles.sort((a, b) => b.createdAt.compareTo(a.createdAt));
@ -83,7 +82,9 @@ class _StorageContentsViewState extends State<StorageContentsView> {
: null,
title: isSelecting
? Text(
context.lang.memoriesSelectedCount(_selectedMediaIds.length),
context.lang.memoriesSelectedCount(
_selectedMediaIds.length,
),
style: const TextStyle(fontWeight: FontWeight.bold),
)
: Text(context.lang.settingsStorageContents),
@ -98,61 +99,60 @@ class _StorageContentsViewState extends State<StorageContentsView> {
body: snapshot.connectionState == ConnectionState.waiting
? const Center(child: CircularProgressIndicator())
: snapshot.hasError
? Center(child: Text('Error: ${snapshot.error}'))
: storedFiles.isEmpty
? Center(
child: Text(
context.lang.settingsStorageNoContents,
style: Theme.of(context)
.textTheme
.bodyLarge
?.copyWith(color: Colors.grey),
? Center(child: Text('Error: ${snapshot.error}'))
: storedFiles.isEmpty
? Center(
child: Text(
context.lang.settingsStorageNoContents,
style: Theme.of(
context,
).textTheme.bodyLarge?.copyWith(color: Colors.grey),
),
)
: Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 4,
),
child: Align(
alignment: Alignment.centerLeft,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
_buildChip(
StorageSortOption.size,
context.lang.settingsStorageSortStorage,
),
const SizedBox(width: 8),
_buildChip(
StorageSortOption.newest,
context.lang.settingsStorageSortNewest,
),
const SizedBox(width: 8),
_buildChip(
StorageSortOption.oldest,
context.lang.settingsStorageSortOldest,
),
],
),
)
: Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 4,
),
child: Align(
alignment: Alignment.centerLeft,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
_buildChip(
StorageSortOption.size,
context.lang.settingsStorageSortStorage,
),
const SizedBox(width: 8),
_buildChip(
StorageSortOption.newest,
context.lang.settingsStorageSortNewest,
),
const SizedBox(width: 8),
_buildChip(
StorageSortOption.oldest,
context.lang.settingsStorageSortOldest,
),
],
),
),
),
),
const Divider(height: 1),
Expanded(
child: ListView.builder(
itemCount: storedFiles.length,
itemBuilder: (context, index) {
final file = storedFiles[index];
return _buildListItem(context, file);
},
),
),
],
),
),
),
const Divider(height: 1),
Expanded(
child: ListView.builder(
itemCount: storedFiles.length,
itemBuilder: (context, index) {
final file = storedFiles[index];
return _buildListItem(context, file);
},
),
),
],
),
);
},
);
@ -183,8 +183,8 @@ class _StorageContentsViewState extends State<StorageContentsView> {
final isSelecting = _selectedMediaIds.isNotEmpty;
final ms = MediaFileService(file);
final hasStored = file.stored ||
(ms.storedPath.existsSync() && ms.storedPath.lengthSync() > 0);
final isLocal =
ms.storedPath.existsSync() && ms.storedPath.lengthSync() > 0;
final IconData statusIcon;
final String statusText;
@ -197,7 +197,7 @@ class _StorageContentsViewState extends State<StorageContentsView> {
statusIcon = Icons.cloud_upload_outlined;
statusText = context.lang.settingsStorageLocalOnly;
case CloudState.uploaded:
if (hasStored) {
if (isLocal) {
statusIcon = Icons.cloud_done_outlined;
statusText = context.lang.settingsStorageLocalAndCloud;
} else {
@ -260,16 +260,14 @@ class _StorageContentsViewState extends State<StorageContentsView> {
final ms = MediaFileService(file);
final isVideo = file.type == MediaType.video;
final imgFile = ms.thumbnailPath.existsSync() &&
ms.thumbnailPath.lengthSync() > 0
final imgFile =
ms.thumbnailPath.existsSync() && ms.thumbnailPath.lengthSync() > 0
? ms.thumbnailPath
: ((file.type == MediaType.image || file.type == MediaType.gif) &&
ms.storedPath.existsSync() &&
ms.storedPath.lengthSync() > 0)
ms.storedPath.existsSync() &&
ms.storedPath.lengthSync() > 0)
? ms.storedPath
: (ms.tempPath.existsSync() &&
ms.tempPath.lengthSync() > 0 &&
!isVideo)
: (ms.tempPath.existsSync() && ms.tempPath.lengthSync() > 0 && !isVideo)
? ms.tempPath
: null;
@ -294,16 +292,15 @@ class _StorageContentsViewState extends State<StorageContentsView> {
),
)
: file.blurhash != null
? BlurHash(
hash: file.blurhash!,
optimizationMode:
BlurHashOptimizationMode.approximation,
)
: const Icon(
Icons.image_outlined,
size: 24,
color: Colors.grey,
),
? BlurHash(
hash: file.blurhash!,
optimizationMode: BlurHashOptimizationMode.approximation,
)
: const Icon(
Icons.image_outlined,
size: 24,
color: Colors.grey,
),
),
if (isVideo)
Container(
@ -336,11 +333,12 @@ class _StorageContentsViewState extends State<StorageContentsView> {
if (deleteCompletely == null) return;
try {
MediaFileService(file).fullMediaRemoval();
await twonlyDB.mediaFilesDao.deleteMediaFile(file.mediaId);
if (deleteCompletely) {
await twonlyDB.mediaFilesDao.deleteMediaFile(file.mediaId);
unawaited(apiService.deleteMemory(file.mediaId));
MediaFileService(file).fullMediaRemoval();
} else {
MediaFileService(file).storedPath.deleteSync();
}
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;
if (selectedCount == 0) return;
final selectedFiles = allFiles
.where((file) => _selectedMediaIds.contains(file.mediaId))
.toList();
final hasAnyCloudBackup =
selectedFiles.any((file) => file.cloudState == CloudState.uploaded);
final hasAnyCloudBackup = selectedFiles.any(
(file) => file.cloudState == CloudState.uploaded,
);
final deleteCompletely = await showDeleteMemoriesDialog(
context: context,
@ -380,11 +382,12 @@ class _StorageContentsViewState extends State<StorageContentsView> {
try {
for (final file in selectedFiles) {
MediaFileService(file).fullMediaRemoval();
await twonlyDB.mediaFilesDao.deleteMediaFile(file.mediaId);
if (deleteCompletely) {
await twonlyDB.mediaFilesDao.deleteMediaFile(file.mediaId);
unawaited(apiService.deleteMemory(file.mediaId));
MediaFileService(file).fullMediaRemoval();
} else {
MediaFileService(file).storedPath.deleteSync();
}
}