Squashed commit of the following:

commit 1f890b96beb893c866ed9b47d8e3a9ac6e20662f
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Wed Jan 31 17:41:22 2018 -0500

    Clean up bindView in PlusViewModel

commit c71f4853d385df66a79f9372ecf29507cb64152b
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Wed Jan 31 02:14:37 2018 -0500

    Move QKSMS+ to sliding menu

commit a23d1dd6d314935cd96c530e3419a3a2ca4cab27
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Wed Jan 31 00:28:42 2018 -0500

    Make selected plan more visible

commit 540cda206ede1d3b81d7d42438257f76f9f07cd4
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Wed Jan 31 00:27:03 2018 -0500

    Allow changing dynamic textcolor programatically

commit 859325dd5ffa7aa5958ae2eb5c9eac62bcb8f7bd
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Tue Jan 30 22:26:41 2018 -0500

    Dark mode support for ripple selected state

commit 6a1d5c387fe0a08ef05573f3f07a1cd82b1a37ec
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Tue Jan 30 22:18:27 2018 -0500

    Remove explicit upgrade button, click plan to buy

commit 4a6e85b0c513c8604f8993f78add2b3910c0b49d
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Tue Jan 30 20:43:09 2018 -0500

    Show thank you UI if user has upgraded

commit 080fccf40b4461b6a833ba77fce1267bd8251281
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Tue Jan 30 17:52:02 2018 -0500

    Allow changing plans

commit ac122f138b1840de39f7a7bd1fb36727056233e1
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Tue Jan 30 16:33:59 2018 -0500

    Allow purchase of subscription

commit 3e689443ec197a929308d9add270ae6777cdeae1
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Mon Jan 29 23:21:31 2018 -0500

    Allow selection of different plans

commit d51a90160898b39de5ba4e69fdc8351e2fe7093c
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Mon Jan 29 19:42:56 2018 -0500

    Collapsing toolbar for QKSMS+ activity

commit 06c0d5a834884f144ad7e149b7dea3b0ba38b643
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Mon Jan 29 18:02:05 2018 -0500

    Display pricing information in QKSMS+ activity

commit c0be51eec5e1b091dbe8ba69f28c48e5379011f3
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Mon Jan 29 17:26:16 2018 -0500

    Add ability to view QKSMS+ activity from settings

commit 51e7782a274503401d53a22ccbe55eab2523f200
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Mon Jan 29 15:41:40 2018 -0500

    Indicate currently selected theme

commit 0b3bb3e24b3c40ac517cf05404638061f9b520b8
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Mon Jan 29 15:19:28 2018 -0500

    Move ThemeAdapter package

commit 828b6fe10afd6493884ee8d1c472dcd39f5371d4
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Mon Jan 29 15:10:14 2018 -0500

    Evenly space theme swatches with other items and borders

commit 220499c0676f03c282b201dfd67faa10f20a546d
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Mon Jan 29 14:45:47 2018 -0500

    Evenly distribute theme swatches

commit 4d0995da773f720411b22091fc58d03497d38438
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Sun Jan 28 22:53:49 2018 -0500

    Use separate activity for Theme picker

commit 3886c1890a6320667f9999071213f181e4e2de79
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Sun Jan 28 20:00:17 2018 -0500

    Update more text

commit 3e3995fdf58ee849f6fedabd895aff42f521e473
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Sun Jan 28 19:56:04 2018 -0500

    Update text for blocking

commit b8ffbf30761105abe1150279994c8d0ebd7a68b7
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Sun Jan 28 19:49:11 2018 -0500

    Build layout for QKSMS+ activity

commit 90518ad8291d5028ceb765ca60fe1d36a5edb33a
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Sun Jan 28 19:48:59 2018 -0500

    Improve layout preview support for some custom views

commit 3b301b641e1b747d0ac7192bb50e51d494fe6ef8
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Sun Jan 28 02:22:54 2018 -0500

    Use up-to-date material design colors

commit e8c9cec67767c8702f1b6ccf7ee89c22e585132c
Author: Moez Bhatti <moez.bhatti@gmail.com>
Date:   Sun Jan 28 01:21:24 2018 -0500

    Add strings and icons for QKSMS+ features
This commit is contained in:
Moez Bhatti
2018-01-31 21:20:29 -05:00
parent 218b611ae3
commit 317940d4f7
40 changed files with 1443 additions and 172 deletions
@@ -32,14 +32,17 @@ import common.util.NotificationManager
import presentation.feature.compose.ComposeActivity
import presentation.feature.compose.ComposeViewModel
import presentation.feature.main.MainViewModel
import presentation.feature.plus.PlusActivity
import presentation.feature.plus.PlusViewModel
import presentation.feature.settings.SettingsActivity
import presentation.feature.settings.SettingsViewModel
import presentation.feature.setup.SetupActivity
import presentation.feature.setup.SetupViewModel
import presentation.feature.themepicker.ThemePickerActivity
import presentation.feature.themepicker.ThemePickerViewModel
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class Navigator @Inject constructor(val context: Context) {
@@ -53,6 +56,11 @@ class Navigator @Inject constructor(val context: Context) {
startActivity(intent)
}
fun showQksmsPlusActivity() {
val intent = Intent(context, PlusActivity::class.java)
startActivity(intent)
}
fun showDefaultSmsDialog() {
val intent = Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT)
if (Telephony.Sms.getDefaultSmsPackage(context) != context.packageName) {
@@ -78,6 +86,11 @@ class Navigator @Inject constructor(val context: Context) {
startActivity(intent)
}
fun showThemePicker() {
val intent = Intent(context, ThemePickerActivity::class.java)
startActivity(intent)
}
fun makePhoneCall(address: String) {
val intent = Intent(Intent.ACTION_DIAL, Uri.parse("tel:$address"))
startActivity(intent)
@@ -110,9 +123,11 @@ class Navigator @Inject constructor(val context: Context) {
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
return when (modelClass) {
MainViewModel::class.java -> MainViewModel()
PlusViewModel::class.java -> PlusViewModel()
SetupViewModel::class.java -> SetupViewModel()
ComposeViewModel::class.java -> ComposeViewModel(intent)
SettingsViewModel::class.java -> SettingsViewModel()
ThemePickerViewModel::class.java -> ThemePickerViewModel()
else -> throw IllegalArgumentException("Invalid ViewModel class. If this is a new ViewModel, please add it to Navigator.kt")
} as T
}