1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-231 Keyboard are re-opened on empty cell clicked (#2453)

* DROID-231 do not need to save focus for empty cell

* DROID-231 code style

Co-authored-by: konstantiniiv <ki@anytype.io>
This commit is contained in:
Konstantin Ivanov 2022-08-01 10:57:08 +02:00 committed by GitHub
parent 518def250a
commit 97cf5e53f6
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2786,14 +2786,6 @@ class EditorViewModel(
}
private fun onTableRowEmptyCellClicked(cellId: Id, rowId: Id, tableId: Id) {
viewModelScope.launch {
orchestrator.stores.focus.update(
Editor.Focus(
id = cellId,
cursor = Editor.Cursor.Start
)
)
}
fillTableBlockRow(
cellId = cellId,
targetIds = listOf(rowId),
@ -4559,7 +4551,8 @@ class EditorViewModel(
viewModelScope.launch {
getCompatibleObjectTypes.invoke(
GetCompatibleObjectTypes.Params(
smartBlockType = blocks.first { it.id == context }.content<Content.Smart>().type,
smartBlockType = blocks.first { it.id == context }
.content<Content.Smart>().type,
excludedTypes = excluded
)
).proceed(
@ -5877,7 +5870,7 @@ class EditorViewModel(
fun onHideSimpleTableWidget() {}
private fun proceedWithSelectingCell(cellId:Id, tableId: Id) {
private fun proceedWithSelectingCell(cellId: Id, tableId: Id) {
clearSelections()
select(listOf(cellId))