mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Fix backup not resuming after closed and reopen (#266)
* Fixed app not resuming backup after closing and reopening the app * Fixed cosmetic effect of backup button doesn't change state right away after pressing start backup * Fixed grammar * Fixed deep copy problem that cause incorrect asset count when backing up * Format code
This commit is contained in:
parent
d02b97e1c1
commit
40a8115101
63 changed files with 677 additions and 300 deletions
|
|
@ -149,7 +149,8 @@ class ImmichExif {
|
|||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory ImmichExif.fromJson(String source) => ImmichExif.fromMap(json.decode(source));
|
||||
factory ImmichExif.fromJson(String source) =>
|
||||
ImmichExif.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ class ImmichAsset extends Equatable {
|
|||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory ImmichAsset.fromJson(String source) => ImmichAsset.fromMap(json.decode(source));
|
||||
factory ImmichAsset.fromJson(String source) =>
|
||||
ImmichAsset.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
|
|||
|
|
@ -85,13 +85,15 @@ class ImmichAssetWithExif {
|
|||
originalPath: map['originalPath'] ?? '',
|
||||
isFavorite: map['isFavorite'] ?? false,
|
||||
duration: map['duration'],
|
||||
exifInfo: map['exifInfo'] != null ? ImmichExif.fromMap(map['exifInfo']) : null,
|
||||
exifInfo:
|
||||
map['exifInfo'] != null ? ImmichExif.fromMap(map['exifInfo']) : null,
|
||||
);
|
||||
}
|
||||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory ImmichAssetWithExif.fromJson(String source) => ImmichAssetWithExif.fromMap(json.decode(source));
|
||||
factory ImmichAssetWithExif.fromJson(String source) =>
|
||||
ImmichAssetWithExif.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
|
|||
|
|
@ -34,16 +34,20 @@ class MapboxInfo {
|
|||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory MapboxInfo.fromJson(String source) => MapboxInfo.fromMap(json.decode(source));
|
||||
factory MapboxInfo.fromJson(String source) =>
|
||||
MapboxInfo.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() => 'MapboxInfo(isEnable: $isEnable, mapboxSecret: $mapboxSecret)';
|
||||
String toString() =>
|
||||
'MapboxInfo(isEnable: $isEnable, mapboxSecret: $mapboxSecret)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
|
||||
return other is MapboxInfo && other.isEnable == isEnable && other.mapboxSecret == mapboxSecret;
|
||||
return other is MapboxInfo &&
|
||||
other.isEnable == isEnable &&
|
||||
other.mapboxSecret == mapboxSecret;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ class ServerInfo {
|
|||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory ServerInfo.fromJson(String source) => ServerInfo.fromMap(json.decode(source));
|
||||
factory ServerInfo.fromJson(String source) =>
|
||||
ServerInfo.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ class ServerInfoState {
|
|||
mapboxInfo: mapboxInfo ?? this.mapboxInfo,
|
||||
serverVersion: serverVersion ?? this.serverVersion,
|
||||
isVersionMismatch: isVersionMismatch ?? this.isVersionMismatch,
|
||||
versionMismatchErrorMessage: versionMismatchErrorMessage ?? this.versionMismatchErrorMessage,
|
||||
versionMismatchErrorMessage:
|
||||
versionMismatchErrorMessage ?? this.versionMismatchErrorMessage,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -50,7 +51,8 @@ class ServerInfoState {
|
|||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory ServerInfoState.fromJson(String source) => ServerInfoState.fromMap(json.decode(source));
|
||||
factory ServerInfoState.fromJson(String source) =>
|
||||
ServerInfoState.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ class ServerVersion {
|
|||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory ServerVersion.fromJson(String source) => ServerVersion.fromMap(json.decode(source));
|
||||
factory ServerVersion.fromJson(String source) =>
|
||||
ServerVersion.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
|
|||
|
|
@ -36,16 +36,20 @@ class UploadProfileImageResponse {
|
|||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory UploadProfileImageResponse.fromJson(String source) => UploadProfileImageResponse.fromMap(json.decode(source));
|
||||
factory UploadProfileImageResponse.fromJson(String source) =>
|
||||
UploadProfileImageResponse.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() => 'UploadProfileImageReponse(userId: $userId, profileImagePath: $profileImagePath)';
|
||||
String toString() =>
|
||||
'UploadProfileImageReponse(userId: $userId, profileImagePath: $profileImagePath)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
|
||||
return other is UploadProfileImageResponse && other.userId == userId && other.profileImagePath == profileImagePath;
|
||||
return other is UploadProfileImageResponse &&
|
||||
other.userId == userId &&
|
||||
other.profileImagePath == profileImagePath;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -56,18 +56,19 @@ class User {
|
|||
factory User.fromJson(String source) => User.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() => 'UserInfo(id: $id, email: $email, createdAt: $createdAt)';
|
||||
String toString() =>
|
||||
'UserInfo(id: $id, email: $email, createdAt: $createdAt)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
|
||||
return other is User &&
|
||||
other.id == id &&
|
||||
other.email == email &&
|
||||
other.createdAt == createdAt &&
|
||||
other.firstName == firstName &&
|
||||
other.lastName == lastName;
|
||||
other.id == id &&
|
||||
other.email == email &&
|
||||
other.createdAt == createdAt &&
|
||||
other.firstName == firstName &&
|
||||
other.lastName == lastName;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue