Migrate old SIA preference

This commit is contained in:
moezbhatti
2019-06-29 01:58:14 -04:00
parent 9d920cddb9
commit 592bd3d447
2 changed files with 10 additions and 0 deletions
@@ -24,6 +24,14 @@ class BlockingManager @Inject constructor(
else -> qkBlockingClient
}
init {
// Migrate from old SIA preference to blocking manager preference
if (prefs.sia.get()) {
prefs.blockingManager.set(Preferences.BLOCKING_MANAGER_SIA)
prefs.sia.delete()
}
}
override fun isBlocked(address: String): Single<Boolean> = client.isBlocked(address)
override fun canBlock(): Boolean = client.canBlock()