Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit c21a1f9

Browse files
committed
Did minor improvement
1 parent e9f8eb5 commit c21a1f9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

data/lib/domain/config.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class ProviderConstants {
1010
class LocalDatabaseConstants {
1111
static const String databaseName = 'cloud-gallery.db';
1212
static const String albumDatabaseName = 'cloud-gallery-album.db';
13+
static const String cleanUpDatabaseName = 'cloud-gallery-clean-up.db';
1314
static const String uploadQueueTable = 'UploadQueue';
1415
static const String downloadQueueTable = 'DownloadQueue';
1516
static const String albumsTable = 'Albums';

data/lib/services/local_media_service.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ class LocalMediaService {
108108

109109
Future<Database> openCleanUpDatabase() async {
110110
return await openDatabase(
111-
LocalDatabaseConstants.databaseName,
111+
LocalDatabaseConstants.cleanUpDatabaseName,
112112
version: 1,
113-
onConfigure: (Database db) async {
113+
onCreate: (db, version) async {
114114
await db.execute(
115115
'CREATE TABLE IF NOT EXISTS ${LocalDatabaseConstants.cleanUpTable} ('
116116
'id TEXT PRIMARY KEY, '
@@ -153,6 +153,7 @@ class LocalMediaService {
153153

154154
Future<List<CleanUpMedia>> getCleanUpMedias() async {
155155
final database = await openCleanUpDatabase();
156+
156157
final res = await database.query(LocalDatabaseConstants.cleanUpTable);
157158
return res.map((e) => CleanUpMedia.fromJson(e)).toList();
158159
}

0 commit comments

Comments
 (0)