From 011f1532971d63559568c939c72dc967f20704cd Mon Sep 17 00:00:00 2001 From: Evgenii Kozlov Date: Mon, 5 May 2025 17:12:13 +0200 Subject: [PATCH] DROID-3633 Protocol | Enhancement | MW 0.41.0-rc1 (#2377) --- .../presentation/ChatViewModel.kt | 4 +-- gradle/libs.versions.toml | 2 +- protocol/src/main/proto/commands.proto | 25 +++++++++++++++++++ protocol/src/main/proto/events.proto | 8 ++++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/feature-chats/src/main/java/com/anytypeio/anytype/feature_chats/presentation/ChatViewModel.kt b/feature-chats/src/main/java/com/anytypeio/anytype/feature_chats/presentation/ChatViewModel.kt index 9d761946a5..355572bdff 100644 --- a/feature-chats/src/main/java/com/anytypeio/anytype/feature_chats/presentation/ChatViewModel.kt +++ b/feature-chats/src/main/java/com/anytypeio/anytype/feature_chats/presentation/ChatViewModel.kt @@ -939,10 +939,10 @@ class ChatViewModel @Inject constructor( } } - fun onScrollToBottomClicked() { + fun onScrollToBottomClicked(lastVisibleMessage: Id?) { Timber.d("DROID-2966 onScrollToBottom") viewModelScope.launch { - chatContainer.onLoadChatTail() + chatContainer.onLoadChatTail(lastVisibleMessage) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f1889b9ce7..e0a8cdbdd2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -middlewareVersion = "v0.40.19" +middlewareVersion = "v0.41.0-rc1" kotlinVersion = '2.0.21' kspVersion = "2.0.21-1.0.25" diff --git a/protocol/src/main/proto/commands.proto b/protocol/src/main/proto/commands.proto index 22174011f9..522875cfb6 100644 --- a/protocol/src/main/proto/commands.proto +++ b/protocol/src/main/proto/commands.proto @@ -8389,6 +8389,31 @@ message Rpc { Code code = 1; string description = 2; + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + } + } + } + } + } + message PushNotification { + message RegisterToken { + message Request { + string token = 1; + Platform platform = 2; + } + enum Platform { + IOS = 0; + Android = 1; + } + message Response { + Error error = 1; + message Error { + Code code = 1; + string description = 2; + enum Code { NULL = 0; UNKNOWN_ERROR = 1; diff --git a/protocol/src/main/proto/events.proto b/protocol/src/main/proto/events.proto index 59d66182ee..591d784e24 100644 --- a/protocol/src/main/proto/events.proto +++ b/protocol/src/main/proto/events.proto @@ -122,6 +122,7 @@ message Event { Chat.Delete chatDelete = 131; Chat.UpdateState chatStateUpdate = 133; // in case new unread messages received or chat state changed (e.g. message read on another device) + PushEncryptionKey.Update pushEncryptionKeyUpdate = 136; } } @@ -1189,6 +1190,13 @@ message Event { model.Import.Type importType = 3; } } + + message PushEncryptionKey { + message Update { + string encryptionKeyId = 1; + string encryptionKey = 2; + } + } } message ResponseEvent {