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

DROID-2644 Sync Status | Editor + sets implementation (#1422)

This commit is contained in:
Konstantin Ivanov 2024-07-25 12:59:47 +02:00 committed by GitHub
parent ad96048321
commit e67704f7f2
Signed by: github
GPG key ID: B5690EEEBB952194
63 changed files with 1289 additions and 605 deletions

View file

@ -6,14 +6,14 @@ import com.anytypeio.anytype.domain.workspace.P2PStatusChannel
import kotlinx.coroutines.flow.Flow
interface P2PStatusRemoteChannel {
fun observe(activeSpaceId: Id): Flow<List<P2PStatusUpdate>>
fun observe(activeSpaceId: Id): Flow<P2PStatusUpdate>
}
class P2PStatusDataChannel(
private val channel: P2PStatusRemoteChannel
) : P2PStatusChannel {
override fun observe(activeSpaceId: Id): Flow<List<P2PStatusUpdate>> {
override fun observe(activeSpaceId: Id): Flow<P2PStatusUpdate> {
return channel.observe(activeSpaceId)
}
}

View file

@ -6,14 +6,14 @@ import com.anytypeio.anytype.domain.workspace.SpaceSyncStatusChannel
import kotlinx.coroutines.flow.Flow
interface SpaceStatusRemoteChannel {
fun observe(activeSpaceId: String): Flow<List<SpaceSyncUpdate>>
fun observe(activeSpaceId: String): Flow<SpaceSyncUpdate>
}
class SpaceStatusDataChannel(
private val channel: SpaceStatusRemoteChannel
) : SpaceSyncStatusChannel {
override fun observe(activeSpaceId: Id): Flow<List<SpaceSyncUpdate>> {
override fun observe(activeSpaceId: Id): Flow<SpaceSyncUpdate> {
return channel.observe(activeSpaceId)
}
}

View file

@ -1,15 +0,0 @@
package com.anytypeio.anytype.data.auth.status
import com.anytypeio.anytype.core_models.SyncStatus
import com.anytypeio.anytype.domain.status.ThreadStatusChannel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
class ThreadStatusDataChannel(
private val remote: ThreadStatusRemoteChannel,
) : ThreadStatusChannel {
override fun observe(ctx: String): Flow<SyncStatus> {
return remote.observe(ctx)
}
}

View file

@ -1,9 +0,0 @@
package com.anytypeio.anytype.data.auth.status
import com.anytypeio.anytype.core_models.Id
import com.anytypeio.anytype.core_models.SyncStatus
import kotlinx.coroutines.flow.Flow
interface ThreadStatusRemoteChannel {
fun observe(ctx: Id): Flow<SyncStatus>
}