forked from github/szkolny
[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 "long", "BUILD_TIMESTAMP", String.valueOf(System.currentTimeMillis())
|
||||
buildConfigField "String", "VERSION_BASE", release.versionName
|
||||
buildConfigField "String", "VERSION_BASE", "\"${release.versionName}\""
|
||||
|
||||
multiDexEnabled = true
|
||||
|
||||
|
@ -302,21 +302,9 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
mainSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
|
||||
errorSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
|
||||
|
||||
when {
|
||||
BuildConfig.VERSION_NAME.contains("nightly") -> {
|
||||
b.nightlyText.isVisible = true
|
||||
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
|
||||
}
|
||||
val versionBadge = app.buildManager.versionBadge
|
||||
b.nightlyText.isVisible = versionBadge != null
|
||||
b.nightlyText.text = versionBadge
|
||||
|
||||
navLoading = true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user