Skip to content

Commit

Permalink
Perform QK migration only after realm migration
Browse files Browse the repository at this point in the history
  • Loading branch information
moezbhatti committed Jan 27, 2020
1 parent c0b2f61 commit 33b239d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/src/main/java/com/moez/QKSMS/migration/QkMigration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class QKApplication : Application(), HasActivityInjector, HasBroadcastReceiverIn
.schemaVersion(QkRealmMigration.SchemaVersion)
.build())

qkMigration.performMigration()

GlobalScope.launch(Dispatchers.IO) {
referralManager.trackReferrer()
}
Expand Down

0 comments on commit 33b239d

Please sign in to comment.