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

DROID-1064 Protocol | Enhancement | MW 0.26.0-rc2 (#3006)

This commit is contained in:
Evgenii Kozlov 2023-03-13 19:17:17 +01:00 committed by GitHub
parent 4de4ca24f3
commit 2ebb75c791
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 2 deletions

View file

@ -373,7 +373,7 @@ data class Block(
val layout: Layout
) : Content() {
enum class Layout {
TREE, LINK
TREE, LINK, LIST
}
}
}

View file

@ -1,5 +1,5 @@
[versions]
middlewareVersion = "v0.26.0-rc1"
middlewareVersion = "v0.26.0-rc2"
kotlinVersion = '1.7.10'
androidxCoreVersion = "1.9.0"
androidxComposeVersion1 = '1.3.1'

View file

@ -377,6 +377,7 @@ fun MBlock.toCoreWidget(): Block.Content.Widget {
layout = when (content.layout) {
MWidgetLayout.Link -> Block.Content.Widget.Layout.LINK
MWidgetLayout.Tree -> Block.Content.Widget.Layout.TREE
MWidgetLayout.List -> Block.Content.Widget.Layout.LIST
}
)
}

View file

@ -476,4 +476,5 @@ fun List<InternalFlags>.toMiddlewareModel(): List<InternalFlag> = map {
fun Block.Content.Widget.Layout.mw() : MWidgetLayout = when(this) {
Block.Content.Widget.Layout.TREE -> MWidgetLayout.Tree
Block.Content.Widget.Layout.LINK -> MWidgetLayout.Link
Block.Content.Widget.Layout.LIST -> MWidgetLayout.List
}

View file

@ -115,6 +115,9 @@ fun List<Block>.parseWidgets(
)
)
}
Block.Content.Widget.Layout.LIST -> {
// TODO handle in the next PR
}
}
}
}

View file

@ -506,6 +506,7 @@ message Block {
enum Layout {
Link = 0;
Tree = 1;
List = 2;
}
}
}
@ -649,6 +650,12 @@ message ThreadCreateQueueEntry {
string threadId = 2;
}
message Object {
message ChangePayload {
SmartBlockType smartBlockType = 1;
}
}
message ObjectType {
string url = 1; // leave empty in case you want to create the new one
string name = 2; // name of objectType (can be localized for bundled types)