fix: Clicking add a new URI button does nothing #232
This commit is contained in:
parent
70411332af
commit
f4e884b39b
|
@ -109,6 +109,7 @@ import com.artemchep.keyguard.ui.ExpandedIfNotEmpty
|
||||||
import com.artemchep.keyguard.ui.ExpandedIfNotEmptyForRow
|
import com.artemchep.keyguard.ui.ExpandedIfNotEmptyForRow
|
||||||
import com.artemchep.keyguard.ui.FlatDropdown
|
import com.artemchep.keyguard.ui.FlatDropdown
|
||||||
import com.artemchep.keyguard.ui.FlatItem
|
import com.artemchep.keyguard.ui.FlatItem
|
||||||
|
import com.artemchep.keyguard.ui.FlatItemAction
|
||||||
import com.artemchep.keyguard.ui.FlatItemLayout
|
import com.artemchep.keyguard.ui.FlatItemLayout
|
||||||
import com.artemchep.keyguard.ui.FlatItemTextContent
|
import com.artemchep.keyguard.ui.FlatItemTextContent
|
||||||
import com.artemchep.keyguard.ui.FlatSimpleNote
|
import com.artemchep.keyguard.ui.FlatSimpleNote
|
||||||
|
@ -1370,13 +1371,14 @@ private fun AddItem(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onClick = {
|
onClick = {
|
||||||
if (item.actions.size == 1) {
|
if (item.actions.size == 1) run {
|
||||||
// TODO: !!!!!!!!!
|
val action = item.actions
|
||||||
// item.actions.first()
|
.firstNotNullOfOrNull { it as? FlatItemAction }
|
||||||
// .onClick?.invoke()
|
action?.onClick?.invoke()
|
||||||
} else {
|
return@run
|
||||||
dropdownShownState.value = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dropdownShownState.value = true
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue