fix: mobile edit handling (#25315)

Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
Brandon Wees
2026-01-19 12:22:53 -06:00
committed by GitHub
parent b3f5b8ede8
commit 1b56bb84f9
64 changed files with 9350 additions and 168 deletions

View File

@@ -44,7 +44,7 @@ SyncAssetV1 _createAsset({
livePhotoVideoId: null,
stackId: null,
thumbhash: null,
editCount: 0,
isEdited: false,
);
}

View File

@@ -19,6 +19,7 @@ import 'schema_v13.dart' as v13;
import 'schema_v14.dart' as v14;
import 'schema_v15.dart' as v15;
import 'schema_v16.dart' as v16;
import 'schema_v17.dart' as v17;
class GeneratedHelper implements SchemaInstantiationHelper {
@override
@@ -56,6 +57,8 @@ class GeneratedHelper implements SchemaInstantiationHelper {
return v15.DatabaseAtV15(db);
case 16:
return v16.DatabaseAtV16(db);
case 17:
return v17.DatabaseAtV17(db);
default:
throw MissingSchemaException(version, versions);
}
@@ -78,5 +81,6 @@ class GeneratedHelper implements SchemaInstantiationHelper {
14,
15,
16,
17,
];
}

File diff suppressed because it is too large Load Diff

View File

@@ -64,6 +64,7 @@ abstract final class LocalAssetStub {
type: AssetType.image,
createdAt: DateTime(2025),
updatedAt: DateTime(2025, 2),
isEdited: false,
);
static final image2 = LocalAsset(
@@ -72,5 +73,6 @@ abstract final class LocalAssetStub {
type: AssetType.image,
createdAt: DateTime(2000),
updatedAt: DateTime(20021),
isEdited: false,
);
}

View File

@@ -128,7 +128,7 @@ abstract final class SyncStreamStub {
visibility: AssetVisibility.timeline,
width: null,
height: null,
editCount: 0,
isEdited: false,
),
ack: ack,
);

View File

@@ -194,6 +194,7 @@ void main() {
latitude: 37.7749,
longitude: -122.4194,
adjustmentTime: DateTime(2026, 1, 2),
isEdited: false,
);
final mockEntity = MockAssetEntity();
@@ -242,6 +243,7 @@ void main() {
cloudId: 'cloud-id-123',
latitude: 37.7749,
longitude: -122.4194,
isEdited: false,
);
final mockEntity = MockAssetEntity();
@@ -279,6 +281,7 @@ void main() {
createdAt: DateTime(2025, 1, 1),
updatedAt: DateTime(2025, 1, 2),
cloudId: null, // No cloudId
isEdited: false,
);
final mockEntity = MockAssetEntity();
@@ -320,6 +323,7 @@ void main() {
cloudId: 'cloud-id-livephoto',
latitude: 37.7749,
longitude: -122.4194,
isEdited: false,
);
final mockEntity = MockAssetEntity();

View File

@@ -131,6 +131,7 @@ abstract final class TestUtils {
isFavorite: false,
width: width,
height: height,
isEdited: false,
);
}
@@ -154,6 +155,7 @@ abstract final class TestUtils {
width: width,
height: height,
orientation: orientation,
isEdited: false,
);
}
}

View File

@@ -27,6 +27,7 @@ class MediumFactory {
type: type ?? AssetType.image,
createdAt: createdAt ?? DateTime.fromMillisecondsSinceEpoch(random.nextInt(1000000000)),
updatedAt: updatedAt ?? DateTime.fromMillisecondsSinceEpoch(random.nextInt(1000000000)),
isEdited: false,
);
}

View File

@@ -23,6 +23,7 @@ LocalAsset createLocalAsset({
createdAt: createdAt ?? DateTime.now(),
updatedAt: updatedAt ?? DateTime.now(),
isFavorite: isFavorite,
isEdited: false,
);
}
@@ -45,6 +46,7 @@ RemoteAsset createRemoteAsset({
createdAt: createdAt ?? DateTime.now(),
updatedAt: updatedAt ?? DateTime.now(),
isFavorite: isFavorite,
isEdited: false,
);
}