Hide irrelevant options when selecting sessions

This commit is contained in:
Matéo Duparc 2022-05-10 13:05:35 +02:00
parent 81dc567ff0
commit fcc7d64b9d
Signed by: hardcoresushi
GPG Key ID: AFE384344A45E13A

View File

@ -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
}