mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Dont create labels in the library mode
This commit is contained in:
parent
6c2059807f
commit
42d9c5fea8
1 changed files with 9 additions and 2 deletions
|
|
@ -227,7 +227,6 @@ fun LabelsSelectionSheetContent(
|
|||
onSave: (List<SavedItemLabel>) -> Unit,
|
||||
onCreateLabel: (String, String) -> Unit
|
||||
) {
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
val interactionSource = remember { MutableInteractionSource() }
|
||||
|
||||
val state = rememberChipTextFieldState(initialSelectedLabels.map {
|
||||
|
|
@ -299,7 +298,15 @@ fun LabelsSelectionSheetContent(
|
|||
state = state,
|
||||
value = filterTextValue,
|
||||
onValueChange = onFilterTextValueChange,
|
||||
onSubmit = { LabelChipView(findOrCreateLabel(it)) },
|
||||
onSubmit = {
|
||||
if (isLibraryMode) {
|
||||
currentLabel?.let {
|
||||
LabelChipView(it)
|
||||
} ?: null
|
||||
} else {
|
||||
LabelChipView(findOrCreateLabel(it))
|
||||
}
|
||||
},
|
||||
chipLeadingIcon = { chip -> CircleIcon(colorHex = chip.label.color) },
|
||||
chipTrailingIcon = { chip -> CloseButton(state, chip) },
|
||||
interactionSource = interactionSource,
|
||||
|
|
|
|||
Loading…
Reference in a new issue