mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 21:06:44 -06:00
[UI] Show bottom bar badge in debug versions.
This commit is contained in:
parent
7c6dbca986
commit
2c24eba46d
@ -295,16 +295,21 @@ 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)
|
||||||
|
|
||||||
if (BuildConfig.VERSION_NAME.contains("nightly")) {
|
when {
|
||||||
|
BuildConfig.VERSION_NAME.contains("nightly") -> {
|
||||||
b.nightlyText.isVisible = true
|
b.nightlyText.isVisible = true
|
||||||
b.nightlyText.text = "Nightly\n"+BuildConfig.VERSION_NAME.substringAfterLast(".")
|
b.nightlyText.text = "Nightly\n"+BuildConfig.VERSION_NAME.substringAfterLast(".")
|
||||||
}
|
}
|
||||||
else if (BuildConfig.VERSION_NAME.contains("daily")) {
|
BuildConfig.VERSION_NAME.contains("daily") -> {
|
||||||
b.nightlyText.isVisible = true
|
b.nightlyText.isVisible = true
|
||||||
b.nightlyText.text = "Daily\n"+BuildConfig.VERSION_NAME.substringAfterLast(".")
|
b.nightlyText.text = "Daily\n"+BuildConfig.VERSION_NAME.substringAfterLast(".")
|
||||||
}
|
}
|
||||||
else
|
BuildConfig.DEBUG -> {
|
||||||
b.nightlyText.isVisible = false
|
b.nightlyText.isVisible = true
|
||||||
|
b.nightlyText.text = "Debug\n"+BuildConfig.VERSION_NAME
|
||||||
|
}
|
||||||
|
else -> b.nightlyText.isVisible = false
|
||||||
|
}
|
||||||
|
|
||||||
navLoading = true
|
navLoading = true
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user