Commit 5b120153 authored by Ricki Hirner's avatar Ricki Hirner

Don't offer collection deletion for read-only collections

parent e7d2c239
......@@ -210,6 +210,8 @@ class AccountActivity: AppCompatActivity(), Toolbar.OnMenuItemClickListener, Pop
isChecked = info.forceReadOnly
}
popup.menu.findItem(R.id.delete_collection).isVisible = !info.readOnly
popup.setOnMenuItemClickListener { item ->
when (item.itemId) {
R.id.force_read_only -> {
......@@ -617,6 +619,7 @@ class AccountActivity: AppCompatActivity(), Toolbar.OnMenuItemClickListener, Pop
if (info.readOnly || info.forceReadOnly) View.VISIBLE else View.GONE
v.findViewById<ImageView>(R.id.action_overflow).setOnClickListener { view ->
@Suppress("ReplaceSingleLineLet")
(context as? AccountActivity)?.let {
it.onActionOverflowListener(view, info)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment