refactor: align AppDatabase code style with project conventions

This commit is contained in:
Himanshu-Kandwal
2025-11-09 17:14:35 +05:30
committed by Nishant Mishra
parent 5ad7f5396e
commit af899c06b4

View File

@@ -17,7 +17,9 @@ import androidx.room.TypeConverters
@Database(
entities = [IntPreference::class, BooleanPreference::class, StringPreference::class, Stat::class],
version = 2,
autoMigrations = [AutoMigration(from = 1, to = 2)]
autoMigrations = [
AutoMigration(from = 1, to = 2)
]
)
@TypeConverters(Converters::class)
abstract class AppDatabase : RoomDatabase() {
@@ -33,7 +35,8 @@ abstract class AppDatabase : RoomDatabase() {
fun getDatabase(context: Context): AppDatabase {
return Instance ?: synchronized(this) {
Instance ?: Room.databaseBuilder(context, AppDatabase::class.java, "app_database")
.build().also { Instance = it }
.build()
.also { Instance = it }
}
}
}