mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
cleanup - v4.0, remove qk+ and help in sidebar
This commit is contained in:
@@ -142,22 +142,22 @@ class Navigator @Inject constructor(
|
||||
}
|
||||
|
||||
fun showDeveloper() {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti"))
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/octoshrimpy"))
|
||||
startActivityExternal(intent)
|
||||
}
|
||||
|
||||
fun showSourceCode() {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms"))
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/octoshrimpy/quik"))
|
||||
startActivityExternal(intent)
|
||||
}
|
||||
|
||||
fun showChangelog() {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms/releases"))
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/octoshrimpy/quik/releases"))
|
||||
startActivityExternal(intent)
|
||||
}
|
||||
|
||||
fun showLicense() {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms/blob/master/LICENSE"))
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/octoshrimpy/quik/blob/master/LICENSE"))
|
||||
startActivityExternal(intent)
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ class Navigator @Inject constructor(
|
||||
analyticsManager.track("Clicked Invite")
|
||||
Intent(Intent.ACTION_SEND)
|
||||
.setType("text/plain")
|
||||
.putExtra(Intent.EXTRA_TEXT, "http://qklabs.com/download")
|
||||
.putExtra(Intent.EXTRA_TEXT, "https://github.com/octoshrimpy/quik/releases/latest")
|
||||
.let { Intent.createChooser(it, null) }
|
||||
.let(::startActivityExternal)
|
||||
}
|
||||
|
||||
@@ -101,12 +101,12 @@ class MainActivity : QkThemedActivity(), MainView {
|
||||
scheduled.clicks().map { NavItem.SCHEDULED },
|
||||
blocking.clicks().map { NavItem.BLOCKING },
|
||||
settings.clicks().map { NavItem.SETTINGS },
|
||||
plus.clicks().map { NavItem.PLUS },
|
||||
help.clicks().map { NavItem.HELP },
|
||||
// plus.clicks().map { NavItem.PLUS },
|
||||
// help.clicks().map { NavItem.HELP },
|
||||
invite.clicks().map { NavItem.INVITE }))
|
||||
}
|
||||
override val optionsItemIntent: Subject<Int> = PublishSubject.create()
|
||||
override val plusBannerIntent by lazy { plusBanner.clicks() }
|
||||
// override val plusBannerIntent by lazy { plusBanner.clicks() }
|
||||
override val dismissRatingIntent by lazy { rateDismiss.clicks() }
|
||||
override val rateIntent by lazy { rateOkay.clicks() }
|
||||
override val conversationsSelectedIntent by lazy { conversationsAdapter.selectionChanges }
|
||||
@@ -238,7 +238,7 @@ class MainActivity : QkThemedActivity(), MainView {
|
||||
listOf(plusBadge1, plusBadge2).forEach { badge ->
|
||||
badge.isVisible = drawerBadgesExperiment.variant && !state.upgraded
|
||||
}
|
||||
plus.isVisible = state.upgraded
|
||||
// plus.isVisible = state.upgraded
|
||||
plusBanner.isVisible = !state.upgraded
|
||||
rateLayout.setVisible(state.showRating)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ interface MainView : QkView<MainState> {
|
||||
val homeIntent: Observable<*>
|
||||
val navigationIntent: Observable<NavItem>
|
||||
val optionsItemIntent: Observable<Int>
|
||||
val plusBannerIntent: Observable<*>
|
||||
// val plusBannerIntent: Observable<*>
|
||||
val dismissRatingIntent: Observable<*>
|
||||
val rateIntent: Observable<*>
|
||||
val conversationsSelectedIntent: Observable<List<Long>>
|
||||
|
||||
@@ -294,8 +294,8 @@ class MainViewModel @Inject constructor(
|
||||
NavItem.SCHEDULED -> navigator.showScheduled()
|
||||
NavItem.BLOCKING -> navigator.showBlockedConversations()
|
||||
NavItem.SETTINGS -> navigator.showSettings()
|
||||
NavItem.PLUS -> navigator.showQksmsPlusActivity("main_menu")
|
||||
NavItem.HELP -> navigator.showSupport()
|
||||
// NavItem.PLUS -> navigator.showQksmsPlusActivity("main_menu")
|
||||
// NavItem.HELP -> navigator.showSupport()
|
||||
NavItem.INVITE -> navigator.showInvite()
|
||||
else -> Unit
|
||||
}
|
||||
@@ -399,12 +399,12 @@ class MainViewModel @Inject constructor(
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
|
||||
view.plusBannerIntent
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe {
|
||||
newState { copy(drawerOpen = false) }
|
||||
navigator.showQksmsPlusActivity("main_banner")
|
||||
}
|
||||
// view.plusBannerIntent
|
||||
// .autoDisposable(view.scope())
|
||||
// .subscribe {
|
||||
// newState { copy(drawerOpen = false) }
|
||||
// navigator.showQksmsPlusActivity("main_banner")
|
||||
// }
|
||||
|
||||
view.rateIntent
|
||||
.autoDisposable(view.scope())
|
||||
|
||||
@@ -59,9 +59,9 @@ class PlusViewModel @Inject constructor(
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { sku -> view.initiatePurchaseFlow(billingManager, sku) }
|
||||
|
||||
view.donateIntent
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { navigator.showDonation() }
|
||||
// view.donateIntent
|
||||
// .autoDisposable(view.scope())
|
||||
// .subscribe { navigator.showDonation() }
|
||||
|
||||
view.themeClicks
|
||||
.autoDisposable(view.scope())
|
||||
|
||||
@@ -218,11 +218,11 @@ class SettingsPresenter @Inject constructor(
|
||||
|
||||
view.nightModeSelected()
|
||||
.withLatestFrom(billingManager.upgradeStatus) { mode, upgraded ->
|
||||
if (!upgraded && mode == Preferences.NIGHT_MODE_AUTO) {
|
||||
view.showQksmsPlusSnackbar()
|
||||
} else {
|
||||
// if (!upgraded && mode == Preferences.NIGHT_MODE_AUTO) {
|
||||
// view.showQksmsPlusSnackbar()
|
||||
// } else {
|
||||
nightModeManager.updateNightMode(mode)
|
||||
}
|
||||
// }
|
||||
}
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
@@ -245,11 +245,11 @@ class SettingsPresenter @Inject constructor(
|
||||
|
||||
view.sendDelaySelected()
|
||||
.withLatestFrom(billingManager.upgradeStatus) { duration, upgraded ->
|
||||
if (!upgraded && duration != 0) {
|
||||
view.showQksmsPlusSnackbar()
|
||||
} else {
|
||||
// if (!upgraded && duration != 0) {
|
||||
// view.showQksmsPlusSnackbar()
|
||||
// } else {
|
||||
prefs.sendDelay.set(duration)
|
||||
}
|
||||
// }
|
||||
}
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
|
||||
Reference in New Issue
Block a user