mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3355 Chats | Tech | Add switcher allowing creating space-level chat in debug mode + Counters API (#2333)
This commit is contained in:
parent
149e9d2b0a
commit
f65f8c11d8
19 changed files with 187 additions and 31 deletions
|
@ -496,7 +496,7 @@ interface BlockRepository {
|
|||
suspend fun addChatMessage(command: Command.ChatCommand.AddMessage): Pair<Id, List<Event.Command.Chats>>
|
||||
suspend fun editChatMessage(command: Command.ChatCommand.EditMessage)
|
||||
suspend fun deleteChatMessage(command: Command.ChatCommand.DeleteMessage)
|
||||
suspend fun getChatMessages(command: Command.ChatCommand.GetMessages): List<Chat.Message>
|
||||
suspend fun getChatMessages(command: Command.ChatCommand.GetMessages): Command.ChatCommand.GetMessages.Response
|
||||
suspend fun getChatMessagesByIds(command: Command.ChatCommand.GetMessagesByIds): List<Chat.Message>
|
||||
suspend fun subscribeLastChatMessages(command: Command.ChatCommand.SubscribeLastMessages): Command.ChatCommand.SubscribeLastMessages.Response
|
||||
suspend fun toggleChatMessageReaction(command: Command.ChatCommand.ToggleMessageReaction)
|
||||
|
|
|
@ -166,6 +166,16 @@ class ChatContainer @Inject constructor(
|
|||
msg
|
||||
}
|
||||
}
|
||||
|
||||
is Event.Command.Chats.UpdateMentionReadStatus -> {
|
||||
// TODO handle event
|
||||
}
|
||||
is Event.Command.Chats.UpdateMessageReadStatus -> {
|
||||
// TODO handle event
|
||||
}
|
||||
is Event.Command.Chats.UpdateState -> {
|
||||
// TODO handle event
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
|
|
@ -10,10 +10,10 @@ import javax.inject.Inject
|
|||
class GetChatMessages @Inject constructor(
|
||||
private val repo: BlockRepository,
|
||||
dispatchers: AppCoroutineDispatchers
|
||||
): ResultInteractor<Command.ChatCommand.GetMessages, List<Chat.Message>>(dispatchers.io) {
|
||||
override suspend fun doWork(
|
||||
params: Command.ChatCommand.GetMessages
|
||||
): List<Chat.Message> {
|
||||
): ResultInteractor<Command.ChatCommand.GetMessages, Command.ChatCommand.GetMessages.Response>(dispatchers.io) {
|
||||
|
||||
|
||||
override suspend fun doWork(params: Command.ChatCommand.GetMessages): Command.ChatCommand.GetMessages.Response {
|
||||
return repo.getChatMessages(params)
|
||||
}
|
||||
}
|
|
@ -18,7 +18,7 @@ class CreateSpace @Inject constructor(
|
|||
details = params.details,
|
||||
withChat = params.withChat,
|
||||
shouldApplyEmptyUseCase = params.shouldApplyEmptyUseCase
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
data class Params(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue