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

Editor | Feature | Note as main type (#1852)

* update proto

* add layout note

* add title note

* send default type on pageCreate

* title can be null

* fixes

* test

* drawables

* object layout screen

* footer adapter

* mapping

* get layouts use case

* fix

* update createPage use case

* default page type on dashboard

* default page type on editor

* fix tests

* notes layout logic

* fix

* hide on text change

* fix

* fix

* fix test

* fix

* fix

* fix test

* fix

* ci off

* fix

* pr fix

* fix

* fix

* fixes

* fix

* fix

* fix

* fix test

* ci off
This commit is contained in:
Konstantin Ivanov 2021-10-25 15:29:55 +03:00 committed by GitHub
parent 8a4f0e05eb
commit 8076d126f0
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 732 additions and 218 deletions

View file

@ -42,10 +42,11 @@ class BlockDataRepository(
command: Command.UpdateAlignment
): Payload = factory.remote.updateAlignment(command)
override suspend fun createPage(ctx: Id?, emoji: String?, isDraft: Boolean?) = factory.remote.createPage(
override suspend fun createPage(ctx: Id?, emoji: String?, isDraft: Boolean?, type: String?) = factory.remote.createPage(
ctx = ctx,
emoji = emoji,
isDraft = isDraft
isDraft = isDraft,
type = type
)
override suspend fun closePage(id: String) {

View file

@ -26,7 +26,7 @@ interface BlockDataStore {
suspend fun move(command: Command.Move): Payload
suspend fun unlink(command: Command.Unlink): Payload
suspend fun getConfig(): Config
suspend fun createPage(ctx: Id?, emoji: String?, isDraft: Boolean?): Id
suspend fun createPage(ctx: Id?, emoji: String?, isDraft: Boolean?, type: String?): Id
suspend fun openPage(id: String): Payload
suspend fun openObjectSet(id: String): Payload
suspend fun openProfile(id: String): Payload

View file

@ -23,7 +23,7 @@ interface BlockRemote {
suspend fun updateCheckbox(command: Command.UpdateCheckbox): Payload
suspend fun move(command: Command.Move): Payload
suspend fun getConfig(): Config
suspend fun createPage(ctx: Id?, emoji: String?, isDraft: Boolean?): Id
suspend fun createPage(ctx: Id?, emoji: String?, isDraft: Boolean?, type: String?): Id
suspend fun createPage(command: Command.CreateNewDocument): String
suspend fun openPage(id: String): Payload
suspend fun openProfile(id: String): Payload

View file

@ -18,8 +18,9 @@ class BlockRemoteDataStore(private val remote: BlockRemote) : BlockDataStore {
override suspend fun createPage(
ctx: Id?,
emoji: String?,
isDraft: Boolean?
): Id = remote.createPage(ctx = ctx, emoji = emoji, isDraft = isDraft)
isDraft: Boolean?,
type: String?
): Id = remote.createPage(ctx = ctx, emoji = emoji, isDraft = isDraft, type = type)
override suspend fun openPage(id: String): Payload = remote.openPage(id)
override suspend fun openProfile(id: String): Payload = remote.openProfile(id)