From f0e17f4038911e7d982387c641d05a901d6c7b07 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Thu, 21 Nov 2024 22:39:57 +0100 Subject: [PATCH] fixes after some wrong merge after merge conflict Signed-off-by: Marcel Hibbe --- .../talk/chat/data/network/ChatNetworkDataSource.kt | 2 +- .../nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/chat/data/network/ChatNetworkDataSource.kt b/app/src/main/java/com/nextcloud/talk/chat/data/network/ChatNetworkDataSource.kt index ae18655113..91375551ac 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/data/network/ChatNetworkDataSource.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/data/network/ChatNetworkDataSource.kt @@ -63,5 +63,5 @@ interface ChatNetworkDataSource { fun deleteChatMessage(credentials: String, url: String): Observable fun createRoom(credentials: String, url: String, map: Map): Observable fun setChatReadMarker(credentials: String, url: String, previousMessageId: Int): Observable - fun editChatMessage(credentials: String, url: String, text: String): Observable + suspend fun editChatMessage(credentials: String, url: String, text: String): ChatOverallSingleMessage } diff --git a/app/src/main/java/com/nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt b/app/src/main/java/com/nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt index 9733a890ab..1b8bb48d21 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt @@ -179,7 +179,6 @@ class RetrofitChatNetwork(private val ncApi: NcApi, private val ncApiCoroutines: previousMessageId: Int ): Observable = ncApi.setChatReadMarker(credentials, url, previousMessageId).map { it } - override fun editChatMessage(credentials: String, url: String, text: String): Observable { - return ncApi.editChatMessage(credentials, url, text).map { it } - } + override suspend fun editChatMessage(credentials: String, url: String, text: String): ChatOverallSingleMessage = + ncApiCoroutines.editChatMessage(credentials, url, text) }