fix: show dialog before delete local action (#22280)

* fix: show dialog on delete local action

# Conflicts:
#	mobile/lib/repositories/asset_media.repository.dart

* button style

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
shenlong 2025-10-14 12:50:14 +05:30 committed by GitHub
parent 8473dab684
commit dbee133764
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 80 additions and 29 deletions

View file

@ -5,7 +5,7 @@ enum AssetVisibility { timeline, hidden, archive, locked }
// Model for an asset stored in the server
class RemoteAsset extends BaseAsset {
final String id;
final String? localId;
final String? localAssetId;
final String? thumbHash;
final AssetVisibility visibility;
final String ownerId;
@ -13,7 +13,7 @@ class RemoteAsset extends BaseAsset {
const RemoteAsset({
required this.id,
this.localId,
String? localId,
required super.name,
required this.ownerId,
required super.checksum,
@ -28,7 +28,13 @@ class RemoteAsset extends BaseAsset {
this.visibility = AssetVisibility.timeline,
super.livePhotoVideoId,
this.stackId,
});
}) : localAssetId = localId;
@override
String? get localId => localAssetId;
@override
String? get remoteId => id;
@override
AssetState get storage => localId == null ? AssetState.remote : AssetState.merged;