mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[UI] Update main activity badge.
This commit is contained in:
parent
1af65de548
commit
bf5fb5f623
@ -19,7 +19,7 @@ android {
|
|||||||
|
|
||||||
buildConfigField "java.util.Map<String, String>", "GIT_INFO", gitInfoMap
|
buildConfigField "java.util.Map<String, String>", "GIT_INFO", gitInfoMap
|
||||||
buildConfigField "long", "BUILD_TIMESTAMP", String.valueOf(System.currentTimeMillis())
|
buildConfigField "long", "BUILD_TIMESTAMP", String.valueOf(System.currentTimeMillis())
|
||||||
buildConfigField "String", "VERSION_BASE", release.versionName
|
buildConfigField "String", "VERSION_BASE", "\"${release.versionName}\""
|
||||||
|
|
||||||
multiDexEnabled = true
|
multiDexEnabled = true
|
||||||
|
|
||||||
|
@ -302,21 +302,9 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
|||||||
mainSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
|
mainSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
|
||||||
errorSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
|
errorSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
|
||||||
|
|
||||||
when {
|
val versionBadge = app.buildManager.versionBadge
|
||||||
BuildConfig.VERSION_NAME.contains("nightly") -> {
|
b.nightlyText.isVisible = versionBadge != null
|
||||||
b.nightlyText.isVisible = true
|
b.nightlyText.text = versionBadge
|
||||||
b.nightlyText.text = "Nightly\n"+BuildConfig.VERSION_NAME.substringAfterLast(".")
|
|
||||||
}
|
|
||||||
BuildConfig.VERSION_NAME.contains("daily") -> {
|
|
||||||
b.nightlyText.isVisible = true
|
|
||||||
b.nightlyText.text = "Daily\n"+BuildConfig.VERSION_NAME.substringAfterLast(".")
|
|
||||||
}
|
|
||||||
BuildConfig.DEBUG -> {
|
|
||||||
b.nightlyText.isVisible = true
|
|
||||||
b.nightlyText.text = "Debug\n"+BuildConfig.VERSION_NAME
|
|
||||||
}
|
|
||||||
else -> b.nightlyText.isVisible = false
|
|
||||||
}
|
|
||||||
|
|
||||||
navLoading = true
|
navLoading = true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user