mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 09:59:00 -07:00
fix(mobile): Fix background backup on iOS (#4038)
This commit is contained in:
parent
fd6ade2b5d
commit
47ea47ce14
11
mobile/.vscode/settings.json
vendored
Normal file
11
mobile/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"dart.flutterSdkPath": ".fvm/flutter_sdk",
|
||||
// Remove .fvm files from search
|
||||
"search.exclude": {
|
||||
"**/.fvm": true
|
||||
},
|
||||
// Remove from file watching
|
||||
"files.watcherExclude": {
|
||||
"**/.fvm": true
|
||||
}
|
||||
}
|
@ -218,6 +218,9 @@ class BackupService {
|
||||
bool anyErrors = false;
|
||||
final List<String> duplicatedAssetIds = [];
|
||||
|
||||
// DON'T KNOW WHY BUT THIS HELPS BACKGROUND BACKUP TO WORK ON IOS
|
||||
await PhotoManager.requestPermissionExtend();
|
||||
|
||||
for (var entity in assetList) {
|
||||
try {
|
||||
if (entity.type == AssetType.video) {
|
||||
@ -248,7 +251,8 @@ class BackupService {
|
||||
|
||||
req.fields['deviceAssetId'] = entity.id;
|
||||
req.fields['deviceId'] = deviceId;
|
||||
req.fields['fileCreatedAt'] = entity.createDateTime.toUtc().toIso8601String();
|
||||
req.fields['fileCreatedAt'] =
|
||||
entity.createDateTime.toUtc().toIso8601String();
|
||||
req.fields['fileModifiedAt'] =
|
||||
entity.modifiedDateTime.toUtc().toIso8601String();
|
||||
req.fields['isFavorite'] = entity.isFavorite.toString();
|
||||
|
Loading…
Reference in New Issue
Block a user