diff options
author | Allan Wang <me@allanwang.ca> | 2017-12-21 20:55:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-21 20:55:51 -0500 |
commit | f1e1aec8487fd148eb8e75fe016a8438958989ad (patch) | |
tree | c4d614e6a3e7d6ef9fa7c04452c357d06bc50279 /app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt | |
parent | d683cae6ffe644a9f63eea6cf3b7e59d2bde617b (diff) | |
download | frost-f1e1aec8487fd148eb8e75fe016a8438958989ad.tar.gz frost-f1e1aec8487fd148eb8e75fe016a8438958989ad.tar.bz2 frost-f1e1aec8487fd148eb8e75fe016a8438958989ad.zip |
misc (#566)
* Fix click validator
* Update tests
* Feature/fb requests (#567)
* Add initial requesting interface
* Update unit tests and dependencies
* Resolve lint
* Fix lint 2
* Fix toolbar location, closes #439
* Add prev version code, closes #551
* Clear test val
* Update changelog
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index 389ff88e..4a9cbb55 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -87,8 +87,8 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, val appBar: AppBarLayout by bindView(R.id.appbar) val coordinator: CoordinatorLayout by bindView(R.id.main_content) override var videoViewer: FrostVideoViewer? = null - lateinit var drawer: Drawer - lateinit var drawerHeader: AccountHeader + private lateinit var drawer: Drawer + private lateinit var drawerHeader: AccountHeader override var searchView: SearchView? = null private val searchViewCache = mutableMapOf<String, List<SearchItem>>() @@ -96,11 +96,13 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) if (BuildConfig.VERSION_CODE > Prefs.versionCode) { + Prefs.prevVersionCode = Prefs.versionCode Prefs.versionCode = BuildConfig.VERSION_CODE if (!BuildConfig.DEBUG) { frostChangelog() frostAnswersCustom("Version", "Version code" to BuildConfig.VERSION_CODE, + "Prev version code" to Prefs.prevVersionCode, "Version name" to BuildConfig.VERSION_NAME, "Build type" to BuildConfig.BUILD_TYPE, "Frost id" to Prefs.frostId) @@ -346,6 +348,10 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, super.onDestroy() } + override fun collapseAppBar() { + appBar.setExpanded(false) + } + override fun backConsumer(): Boolean { if (currentFragment.onBackPressed()) return true if (Prefs.exitConfirmation) { |