Rename userAvatarURLString to userAvatarUrl
This commit is contained in:
parent
d1c7520065
commit
be0da18a7b
6 changed files with 9 additions and 9 deletions
|
|
@ -72,7 +72,7 @@ interface MatrixClient : Closeable {
|
|||
*/
|
||||
suspend fun logout(ignoreSdkError: Boolean): String?
|
||||
suspend fun loadUserDisplayName(): Result<String>
|
||||
suspend fun loadUserAvatarURLString(): Result<String?>
|
||||
suspend fun loadUserAvatarUrl(): Result<String?>
|
||||
suspend fun getAccountManagementUrl(action: AccountManagementAction?): Result<String?>
|
||||
suspend fun uploadMedia(mimeType: String, data: ByteArray, progressCallback: ProgressCallback?): Result<String>
|
||||
fun roomMembershipObserver(): RoomMembershipObserver
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ package io.element.android.libraries.matrix.api.user
|
|||
import io.element.android.libraries.matrix.api.MatrixClient
|
||||
|
||||
/**
|
||||
* Get the current user, as [MatrixUser], using [MatrixClient.loadUserAvatarURLString]
|
||||
* Get the current user, as [MatrixUser], using [MatrixClient.loadUserAvatarUrl]
|
||||
* and [MatrixClient.loadUserDisplayName].
|
||||
*/
|
||||
suspend fun MatrixClient.getCurrentUser(): MatrixUser {
|
||||
val userAvatarUrl = loadUserAvatarURLString().getOrNull()
|
||||
val userAvatarUrl = loadUserAvatarUrl().getOrNull()
|
||||
val userDisplayName = loadUserDisplayName().getOrNull()
|
||||
return MatrixUser(
|
||||
userId = sessionId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue