A few build and navigation bar improvements (#231)

* fix: match project root to repo name

* feat: hide navigation bar until swiped

* fix: limit announcements to official

* feat: keep navigation visible for back

* fix: remove a duplicate permission
This commit is contained in:
TwistedUmbrellaX 2024-03-09 16:06:48 -05:00 committed by GitHub
parent 7f36eba709
commit 14115ada4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 40 additions and 10 deletions

View file

@ -904,16 +904,16 @@ fun toast(string: String?) {
}
}
fun snackString(s: String?, activity: Activity? = null, clipboard: String? = null) {
fun snackString(s: String?, activity: Activity? = null, clipboard: String? = null) : Snackbar? {
try { //I have no idea why this sometimes crashes for some people...
if (s != null) {
(activity ?: currActivity())?.apply {
val snackBar = Snackbar.make(
window.decorView.findViewById(android.R.id.content),
s,
Snackbar.LENGTH_SHORT
)
runOnUiThread {
val snackBar = Snackbar.make(
window.decorView.findViewById(android.R.id.content),
s,
Snackbar.LENGTH_SHORT
)
snackBar.view.apply {
updateLayoutParams<FrameLayout.LayoutParams> {
gravity = (Gravity.CENTER_HORIZONTAL or Gravity.BOTTOM)
@ -933,6 +933,7 @@ fun snackString(s: String?, activity: Activity? = null, clipboard: String? = nul
}
snackBar.show()
}
return snackBar
}
logger(s)
}
@ -940,6 +941,7 @@ fun snackString(s: String?, activity: Activity? = null, clipboard: String? = nul
logger(e.stackTraceToString())
Injekt.get<CrashlyticsInterface>().logException(e)
}
return null
}
open class NoPaddingArrayAdapter<T>(context: Context, layoutId: Int, items: List<T>) :