forked from melod1n/fast-messenger
pinned message in messages history draft
This commit is contained in:
@@ -21,7 +21,7 @@ import dev.meloda.fast.model.database.VkUserEntity
|
||||
VkConversationEntity::class
|
||||
],
|
||||
|
||||
version = 7
|
||||
version = 8
|
||||
)
|
||||
@TypeConverters(Converters::class)
|
||||
abstract class CacheDatabase : RoomDatabase() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package dev.meloda.fast.database.di
|
||||
|
||||
import androidx.room.Room
|
||||
import dev.meloda.fast.database.AccountsDatabase
|
||||
import dev.meloda.fast.database.CacheDatabase
|
||||
import org.koin.core.scope.Scope
|
||||
import org.koin.dsl.module
|
||||
|
||||
@@ -12,7 +13,7 @@ val databaseModule = module {
|
||||
single { get<AccountsDatabase>().accountDao() }
|
||||
|
||||
single {
|
||||
Room.databaseBuilder(get(), dev.meloda.fast.database.CacheDatabase::class.java, "cache")
|
||||
Room.databaseBuilder(get(), CacheDatabase::class.java, "cache")
|
||||
.fallbackToDestructiveMigration()
|
||||
.build()
|
||||
}
|
||||
@@ -22,4 +23,4 @@ val databaseModule = module {
|
||||
single { cacheDB().conversationDao() }
|
||||
}
|
||||
|
||||
private fun Scope.cacheDB(): dev.meloda.fast.database.CacheDatabase = get()
|
||||
private fun Scope.cacheDB(): CacheDatabase = get()
|
||||
|
||||
Reference in New Issue
Block a user