mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Enable filters depending on database
This commit is contained in:
@@ -638,6 +638,9 @@ class GroupActivity : DatabaseLockActivity(),
|
||||
searchFiltersView?.setNumbers(group.numberOfChildEntries)
|
||||
// TODO current group title
|
||||
// searchFiltersView?.setCurrentGroupText("Title with a large text")
|
||||
searchFiltersView?.enableOther(mDatabase?.allowEntryCustomFields() ?: false)
|
||||
searchFiltersView?.enableTags(mDatabase?.tagPool?.isEmpty() ?: false)
|
||||
searchFiltersView?.enableTemplates(mDatabase?.templatesGroup != null)
|
||||
toolbarBreadcrumb?.navigationIcon = null
|
||||
} else {
|
||||
// Add breadcrumb
|
||||
|
||||
@@ -172,6 +172,18 @@ class SearchFiltersView @JvmOverloads constructor(context: Context,
|
||||
searchCurrentGroup.text = if (text.length > 8) text.substring(0, 8) + "…" else text
|
||||
}
|
||||
|
||||
fun enableOther(enable: Boolean) {
|
||||
searchOther.isEnabled = enable
|
||||
}
|
||||
|
||||
fun enableTags(enable: Boolean) {
|
||||
searchTag.isEnabled = enable
|
||||
}
|
||||
|
||||
fun enableTemplates(enable: Boolean) {
|
||||
searchTemplate.isEnabled = enable
|
||||
}
|
||||
|
||||
override fun setVisibility(visibility: Int) {
|
||||
//super.setVisibility(visibility)
|
||||
when (visibility) {
|
||||
|
||||
Reference in New Issue
Block a user