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

Editor | Fix | ActionToolbar, downloads icon (#2221)

Co-authored-by: konstantiniiv <ki@anytype.io>
This commit is contained in:
Konstantin Ivanov 2022-05-02 18:29:44 +03:00 committed by GitHub
parent a25c4ff06d
commit 1c6b268e80
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1575,7 +1575,7 @@ class EditorViewModel(
blocks.forEach { block ->
if (currentSelection().contains(block.id)) {
when (block.content) {
when (val content = block.content) {
is Content.Bookmark -> {
excludedActions.add(ActionItemType.Download)
}
@ -1584,7 +1584,11 @@ class EditorViewModel(
}
is Content.File -> {
needSortByDownloads = true
targetActions.add(ActionItemType.Download)
if (content.state == Content.File.State.DONE) {
targetActions.add(ActionItemType.Download)
} else {
excludedActions.add(ActionItemType.Download)
}
}
is Content.Link -> {
excludedActions.add(ActionItemType.Download)