mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-25 21:55:25 +01:00
use new endpoint for recent threads
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
d35a8e2f59
commit
ec9c018864
@ -32,7 +32,7 @@ class ThreadsOverviewViewModel @Inject constructor(
|
|||||||
val threadsListState: StateFlow<ThreadsListUiState> = _threadsListState
|
val threadsListState: StateFlow<ThreadsListUiState> = _threadsListState
|
||||||
|
|
||||||
fun init(roomToken: String) {
|
fun init(roomToken: String) {
|
||||||
val url = ApiUtils.getUrlForThreads(
|
val url = ApiUtils.getUrlForRecentThreads(
|
||||||
version = 1,
|
version = 1,
|
||||||
baseUrl = _currentUser.baseUrl,
|
baseUrl = _currentUser.baseUrl,
|
||||||
token = roomToken
|
token = roomToken
|
||||||
|
@ -528,9 +528,9 @@ object ApiUtils {
|
|||||||
|
|
||||||
fun getUrlForProfile(baseUrl: String, userId: String): String = "$baseUrl$OCS_API_VERSION/profile/$userId"
|
fun getUrlForProfile(baseUrl: String, userId: String): String = "$baseUrl$OCS_API_VERSION/profile/$userId"
|
||||||
|
|
||||||
fun getUrlForThreads(version: Int, baseUrl: String?, token: String): String =
|
fun getUrlForRecentThreads(version: Int, baseUrl: String?, token: String): String =
|
||||||
getUrlForChat(version, baseUrl, token) + "/threads"
|
getUrlForChat(version, baseUrl, token) + "/threads/recent"
|
||||||
|
|
||||||
fun getUrlForThread(version: Int, baseUrl: String?, token: String, threadId: Int): String =
|
fun getUrlForThread(version: Int, baseUrl: String?, token: String, threadId: Int): String =
|
||||||
getUrlForThreads(version, baseUrl, token) + "/$threadId"
|
getUrlForChat(version, baseUrl, token) + "/threads" + "/$threadId"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user