don't show some menu items when viewing history elements, closes #2967
This commit is contained in:
@@ -1350,7 +1350,16 @@ namespace keepass2android
|
|||||||
public override bool OnPrepareOptionsMenu(IMenu menu)
|
public override bool OnPrepareOptionsMenu(IMenu menu)
|
||||||
{
|
{
|
||||||
Util.PrepareDonateOptionMenu(menu, this);
|
Util.PrepareDonateOptionMenu(menu, this);
|
||||||
return base.OnPrepareOptionsMenu(menu);
|
|
||||||
|
// hide the move and delete options if we're viewing a history element. It is not clear
|
||||||
|
// what the option then means.
|
||||||
|
foreach (var id in new List<int>{Resource.Id.menu_move, Resource.Id.menu_delete})
|
||||||
|
{
|
||||||
|
var menuItem = menu.FindItem(id);
|
||||||
|
menuItem?.SetVisible(_historyIndex < 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.OnPrepareOptionsMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isPaused = false;
|
bool isPaused = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user