mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-1114 Editor | Fix | Note, focus on change type (#3046)
This commit is contained in:
parent
e14ef8b66b
commit
d94e1a3721
1 changed files with 8 additions and 0 deletions
|
@ -4270,6 +4270,7 @@ class EditorViewModel(
|
|||
proceedWithConvertingToCollection()
|
||||
}
|
||||
else -> {
|
||||
clearFocusInCaseOfLayoutNote()
|
||||
proceedWithUpdateObjectType(type = type)
|
||||
sendAnalyticsObjectTypeChangeEvent(
|
||||
analytics = analytics,
|
||||
|
@ -4320,6 +4321,13 @@ class EditorViewModel(
|
|||
)
|
||||
}
|
||||
|
||||
private fun clearFocusInCaseOfLayoutNote() {
|
||||
val layout = orchestrator.stores.details.current().details[context]?.layout?.toInt()
|
||||
if (layout == ObjectType.Layout.NOTE.code) {
|
||||
proceedWithClearingFocus()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val NO_SEARCH_RESULT_POSITION = -1
|
||||
const val NO_SCROLL_POSITION = -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue