|
|
|
|
@ -2,9 +2,6 @@ package net.pokeranalytics.android.util |
|
|
|
|
|
|
|
|
|
import io.realm.Realm |
|
|
|
|
import io.realm.kotlin.where |
|
|
|
|
import kotlinx.coroutines.Dispatchers |
|
|
|
|
import kotlinx.coroutines.GlobalScope |
|
|
|
|
import kotlinx.coroutines.launch |
|
|
|
|
import net.pokeranalytics.android.model.Limit |
|
|
|
|
import net.pokeranalytics.android.model.realm.Bankroll |
|
|
|
|
import net.pokeranalytics.android.model.realm.Game |
|
|
|
|
@ -28,8 +25,6 @@ class FakeDataManager { |
|
|
|
|
|
|
|
|
|
val commitFrequency = 100 |
|
|
|
|
|
|
|
|
|
GlobalScope.launch { |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
val realm = Realm.getDefaultInstance() |
|
|
|
|
@ -94,18 +89,13 @@ class FakeDataManager { |
|
|
|
|
|
|
|
|
|
realm.close() |
|
|
|
|
|
|
|
|
|
launch(Dispatchers.Main) { |
|
|
|
|
callback?.invoke(true) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
Timber.e(e) |
|
|
|
|
launch(Dispatchers.Main) { |
|
|
|
|
callback?.invoke(true) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |