Simplify usage of BillingManager

This commit is contained in:
Moez Bhatti
2018-04-16 18:44:52 -04:00
parent 29c0885131
commit 38891c04bf
6 changed files with 22 additions and 40 deletions
@@ -164,8 +164,8 @@ class SettingsViewModel : QkViewModel<SettingsView, SettingsState>(SettingsState
view.nightModeSelectedIntent
.doOnNext { view.dismissNightModeDialog() }
.withLatestFrom(billingManager.plusStatus, { mode, plusStatus ->
if (plusStatus == BillingManager.UpgradeStatus.REGULAR && mode == Preferences.NIGHT_MODE_AUTO) {
.withLatestFrom(billingManager.upgradeStatus, { mode, upgraded ->
if (!upgraded && mode == Preferences.NIGHT_MODE_AUTO) {
view.showQksmsPlusSnackbar()
} else {
nightModeManager.updateNightMode(mode)