use new endpoint for recent threads

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2025-07-11 17:42:37 +02:00
parent d35a8e2f59
commit ec9c018864
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ class ThreadsOverviewViewModel @Inject constructor(
val threadsListState: StateFlow<ThreadsListUiState> = _threadsListState
fun init(roomToken: String) {
val url = ApiUtils.getUrlForThreads(
val url = ApiUtils.getUrlForRecentThreads(
version = 1,
baseUrl = _currentUser.baseUrl,
token = roomToken

View File

@ -528,9 +528,9 @@ object ApiUtils {
fun getUrlForProfile(baseUrl: String, userId: String): String = "$baseUrl$OCS_API_VERSION/profile/$userId"
fun getUrlForThreads(version: Int, baseUrl: String?, token: String): String =
getUrlForChat(version, baseUrl, token) + "/threads"
fun getUrlForRecentThreads(version: Int, baseUrl: String?, token: String): String =
getUrlForChat(version, baseUrl, token) + "/threads/recent"
fun getUrlForThread(version: Int, baseUrl: String?, token: String, threadId: Int): String =
getUrlForThreads(version, baseUrl, token) + "/$threadId"
getUrlForChat(version, baseUrl, token) + "/threads" + "/$threadId"
}