mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 06:14:10 +01:00
add repo and repo implementation
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
4803712ca3
commit
799d108708
@ -53,4 +53,9 @@ interface ConversationsRepository {
|
||||
suspend fun markConversationAsSensitive(credentials: String, baseUrl: String, roomToken: String): GenericOverall
|
||||
|
||||
suspend fun markConversationAsInsensitive(credentials: String, baseUrl: String, roomToken: String): GenericOverall
|
||||
|
||||
suspend fun markConversationAsImportant(credentials: String, baseUrl: String, roomToken: String): GenericOverall
|
||||
|
||||
suspend fun markConversationAsUnImportant(credentials: String, baseUrl: String, roomToken: String): GenericOverall
|
||||
}
|
||||
|
||||
|
@ -139,6 +139,24 @@ class ConversationsRepositoryImpl(
|
||||
return coroutineApi.markConversationAsInsensitive(credentials, url)
|
||||
}
|
||||
|
||||
override suspend fun markConversationAsImportant(
|
||||
credentials: String,
|
||||
baseUrl: String,
|
||||
roomToken: String
|
||||
): GenericOverall {
|
||||
val url = ApiUtils.getUrlForImportantConversation(baseUrl, roomToken)
|
||||
return coroutineApi.markConversationAsImportant(credentials, url)
|
||||
}
|
||||
|
||||
override suspend fun markConversationAsUnImportant(
|
||||
credentials: String,
|
||||
baseUrl: String,
|
||||
roomToken: String
|
||||
): GenericOverall {
|
||||
val url = ApiUtils.getUrlForImportantConversation(baseUrl, roomToken)
|
||||
return coroutineApi.markConversationAsUnimportant(credentials, url)
|
||||
}
|
||||
|
||||
override suspend fun banActor(
|
||||
credentials: String,
|
||||
url: String,
|
||||
|
@ -205,6 +205,10 @@ object ApiUtils {
|
||||
return getUrlForParticipants(version, baseUrl, token) + "/active"
|
||||
}
|
||||
|
||||
fun getUrlForImportantConversation(baseUrl: String, roomToken: String): String {
|
||||
return "$baseUrl$OCS_API_VERSION/apps/spreed/api/v4/room/$roomToken/important"
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getUrlForParticipantsSelf(version: Int, baseUrl: String?, token: String?): String {
|
||||
return getUrlForParticipants(version, baseUrl, token) + "/self"
|
||||
|
@ -59,7 +59,8 @@ enum class SpreedFeatures(val value: String) {
|
||||
ARCHIVE_CONVERSATIONS("archived-conversations-v2"),
|
||||
CONVERSATION_CREATION_ALL("conversation-creation-all"),
|
||||
UNBIND_CONVERSATION("unbind-conversation"),
|
||||
SENSITIVE_CONVERSATIONS("sensitive-conversations")
|
||||
SENSITIVE_CONVERSATIONS("sensitive-conversations"),
|
||||
IMPORTANT_CONVERSATIONS("important-conversations")
|
||||
}
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
|
@ -242,6 +242,8 @@ How to translate with transifex:
|
||||
<string name="nc_clear_history_success">All messages were deleted</string>
|
||||
<string name="nc_mark_conversation_as_sensitive">Conversation marked as sensitive</string>
|
||||
<string name="nc_mark_conversation_as_insensitive">Conversation unmarked as sensitive</string>
|
||||
<string name="nc_mark_conversation_as_important">Conversation marked as important</string>
|
||||
<string name="nc_mark_conversation_as_unimportant">Conversation unmarked as important</string>
|
||||
<string name="nc_rename">Rename conversation</string>
|
||||
<string name="nc_rename_confirm">Rename</string>
|
||||
<string name="nc_delete_call">Delete conversation</string>
|
||||
@ -350,6 +352,7 @@ How to translate with transifex:
|
||||
<string name="nc_sensitive_conversation">Sensitive conversation</string>
|
||||
<string name="nc_sensitive_conversation_hint">Message preview will be disabled in conversation list and notifications</string>
|
||||
<string name="nc_important_conversation">Important conversation</string>
|
||||
<string name="nc_do_not_disturb">Ignore Do not disturb</string>
|
||||
<string name="nc_important_conversation_desc">Notifications in this conversation will override Do Not Disturb settings</string>
|
||||
|
||||
<string name="nc_all_ok_operation">OK, all done!</string>
|
||||
|
Loading…
Reference in New Issue
Block a user