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

771: Add block below (#810)

* #771: add text block below

* #771: tests

* Update workflow.yml
This commit is contained in:
Konstantin Ivanov 2020-09-08 16:38:07 +03:00 committed by GitHub
parent 0bb0023696
commit 207013077b
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 1 deletions

View file

@ -1012,6 +1012,14 @@ class PageViewModel(
fun onActionMenuItemClicked(id: String, action: ActionItemType) {
when (action) {
ActionItemType.AddBelow -> {
onExitActionMode()
dispatch(Command.PopBackStack)
proceedWithCreatingNewTextBlock(
id = id,
style = Content.Text.Style.P
)
}
ActionItemType.TurnInto -> {
val excludedTypes = mutableListOf<String>()
val target = blocks.first { it.id == id }