Fix small elements

This commit is contained in:
J-Jamet committed 2021-12-16 21:30:40 +01:00
1 parent 2289bf0a27
commit 84943e58f1
4 files changed
+12 -12

No files matched your search

@@ -89,7 +89,13 @@ class GroupDialogFragment : DatabaseDialogFragment() {
}
// populate info in views
nameTextView.text = mGroupInfo.title
val title = mGroupInfo.title
if (title.isEmpty()) {
nameTextView.visibility = View.GONE
} else {
nameTextView.text = title
nameTextView.visibility = View.VISIBLE
}
val notes = mGroupInfo.notes
if (notes == null || notes.isEmpty()) {
notesTextLabelView.visibility = View.GONE
@@ -79,13 +79,7 @@ class BreadcrumbAdapter(val context: Context)
override fun onBindViewHolder(holder: BreadcrumbGroupViewHolder, position: Int) {
val node = mNodeBreadcrumb[position]
holder.groupNameView.apply {
text = when {
node == null -> ""
node.title.isEmpty() -> context.getString(R.string.root)
else -> node.title
}
}
holder.groupNameView.text = node?.title ?: ""
holder.itemView.apply {
setOnClickListener {
@@ -44,6 +44,10 @@ class DatabaseKDB : DatabaseVersioned<Int, UUID, GroupKDB, EntryKDB>() {
get() = "V1"
init {
// New manual root because KDB contains multiple root groups (here available with getRootGroups())
rootGroup = createGroup().apply {
icon.standard = getStandardIcon(IconImageStandard.FOLDER_ID)
}
kdfListV3.add(KdfFactory.aesKdf)
}
@@ -153,10 +153,6 @@ class DatabaseInputKDB(cacheDirectory: File,
)
)
// New manual root because KDB contains multiple root groups (here available with getRootGroups())
val newRoot = mDatabase.createGroup()
mDatabase.rootGroup = newRoot
// Import all nodes
val groupLevelList = HashMap<GroupKDB, Int>()
var newGroup: GroupKDB? = null