Skip to content

Commit

Permalink
Delete after upload
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-pratik-k committed Jan 17, 2025
1 parent 8385719 commit e9f8eb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class MediaPreviewStateNotifier extends StateNotifier<MediaPreviewState> {
try {
state = state.copyWith(actionError: null);
final res = await _localMediaService.deleteMedias([id]);
if(res.isEmpty) return;
if (res.isEmpty) return;
_mediaProcessRepo.notifyDeleteMedia([
DeleteMediaEvent(id: id, source: AppMediaSource.local),
]);
Expand Down
10 changes: 5 additions & 5 deletions data/lib/services/local_media_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ class LocalMediaService {
onConfigure: (Database db) async {
await db.execute(
'CREATE TABLE IF NOT EXISTS ${LocalDatabaseConstants.cleanUpTable} ('
'id TEXT PRIMARY KEY, '
'provider TEXT NOT NULL, '
'created_at TEXT NOT NULL, '
'provider_ref_id TEXT'
')',
'id TEXT PRIMARY KEY, '
'provider TEXT NOT NULL, '
'created_at TEXT NOT NULL, '
'provider_ref_id TEXT'
')',
);
},
);
Expand Down

0 comments on commit e9f8eb5

Please sign in to comment.