Browse Source

Hide irrelevant options when selecting sessions

master
Hardcore Sushi 2 months ago
parent
commit
fcc7d64b9d
Signed by: hardcoresushi
GPG Key ID: AFE384344A45E13A
  1. 5
      app/src/main/java/sushi/hardcore/aira/MainActivity.kt

5
app/src/main/java/sushi/hardcore/aira/MainActivity.kt

@ -188,7 +188,10 @@ class MainActivity : ServiceBoundActivity() {
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.main_activity, menu)
menu.findItem(R.id.remove_contact).isVisible = isSelecting()
val isSelecting = isSelecting()
menu.findItem(R.id.settings).isVisible = !isSelecting
menu.findItem(R.id.close).isVisible = !isSelecting
menu.findItem(R.id.remove_contact).isVisible = isSelecting
return true
}

Loading…
Cancel
Save