mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-20 09:15:26 +02:00
Fix action item click crash
This commit is contained in:
parent
17c9b11d27
commit
4be56ccb0d
@ -66,12 +66,14 @@ internal class UnittoActionModeCallback(
|
||||
}
|
||||
|
||||
fun onActionItemClicked(mode: ActionMode?, item: MenuItem?): Boolean {
|
||||
when (item!!.itemId) {
|
||||
MENU_ITEM_COPY -> onCopyRequested?.invoke()
|
||||
MENU_ITEM_PASTE -> onPasteRequested?.invoke()
|
||||
MENU_ITEM_CUT -> onCutRequested?.invoke()
|
||||
MENU_ITEM_SELECT_ALL -> onSelectAllRequested?.invoke()
|
||||
else -> return false
|
||||
runCatching {
|
||||
when (item!!.itemId) {
|
||||
MENU_ITEM_COPY -> onCopyRequested?.invoke()
|
||||
MENU_ITEM_PASTE -> onPasteRequested?.invoke()
|
||||
MENU_ITEM_CUT -> onCutRequested?.invoke()
|
||||
MENU_ITEM_SELECT_ALL -> onSelectAllRequested?.invoke()
|
||||
else -> return false
|
||||
}
|
||||
}
|
||||
mode?.finish()
|
||||
return true
|
||||
|
Loading…
x
Reference in New Issue
Block a user