mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 03:28:52 +01:00
Perform QK migration only after realm migration
This commit is contained in:
@@ -28,13 +28,13 @@ import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
|
||||
class QkMigration @Inject constructor(
|
||||
context: Context,
|
||||
private val context: Context,
|
||||
private val conversationRepo: ConversationRepository,
|
||||
private val prefs: Preferences,
|
||||
private val qksmsBlockingClient: QksmsBlockingClient
|
||||
) {
|
||||
|
||||
init {
|
||||
fun performMigration() {
|
||||
GlobalScope.launch {
|
||||
val oldVersion = prefs.version.get()
|
||||
|
||||
|
||||
@@ -81,6 +81,8 @@ class QKApplication : Application(), HasActivityInjector, HasBroadcastReceiverIn
|
||||
.schemaVersion(QkRealmMigration.SchemaVersion)
|
||||
.build())
|
||||
|
||||
qkMigration.performMigration()
|
||||
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
referralManager.trackReferrer()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user