mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix action in breadcrumb
This commit is contained in:
@@ -164,27 +164,30 @@ class GroupActivity : DatabaseLockActivity(),
|
|||||||
mBreadcrumbAdapter = BreadcrumbAdapter(this).apply {
|
mBreadcrumbAdapter = BreadcrumbAdapter(this).apply {
|
||||||
// Open group on breadcrumb click
|
// Open group on breadcrumb click
|
||||||
onItemClickListener = { node, _ ->
|
onItemClickListener = { node, _ ->
|
||||||
finishNodeAction()
|
|
||||||
// If last item & not a virtual root group
|
// If last item & not a virtual root group
|
||||||
val currentGroup = mCurrentGroup
|
val currentGroup = mCurrentGroup
|
||||||
if (currentGroup != null && node == currentGroup
|
if (currentGroup != null && node == currentGroup
|
||||||
&& (currentGroup != mDatabase?.rootGroup
|
&& (currentGroup != mDatabase?.rootGroup
|
||||||
|| mDatabase?.rootGroupIsVirtual == false)
|
|| mDatabase?.rootGroupIsVirtual == false)
|
||||||
) {
|
) {
|
||||||
|
finishNodeAction()
|
||||||
launchDialogToShowGroupInfo(currentGroup)
|
launchDialogToShowGroupInfo(currentGroup)
|
||||||
} else {
|
} else {
|
||||||
|
if (mNodesFragment?.nodeActionSelectionMode == true) {
|
||||||
|
finishNodeAction()
|
||||||
|
}
|
||||||
mDatabase?.let { database ->
|
mDatabase?.let { database ->
|
||||||
onNodeClick(database, node)
|
onNodeClick(database, node)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onLongItemClickListener = { node, position ->
|
onLongItemClickListener = { node, position ->
|
||||||
finishNodeAction()
|
|
||||||
val currentGroup = mCurrentGroup
|
val currentGroup = mCurrentGroup
|
||||||
if (currentGroup != null && node == currentGroup
|
if (currentGroup != null && node == currentGroup
|
||||||
&& (currentGroup != mDatabase?.rootGroup
|
&& (currentGroup != mDatabase?.rootGroup
|
||||||
|| mDatabase?.rootGroupIsVirtual == false)
|
|| mDatabase?.rootGroupIsVirtual == false)
|
||||||
) {
|
) {
|
||||||
|
finishNodeAction()
|
||||||
launchDialogForGroupUpdate(currentGroup)
|
launchDialogForGroupUpdate(currentGroup)
|
||||||
} else {
|
} else {
|
||||||
onItemClickListener?.invoke(node, position)
|
onItemClickListener?.invoke(node, position)
|
||||||
|
|||||||
Reference in New Issue
Block a user