mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Rendering typing notification #2242
This commit is contained in:
committed by
Benoit Marty
parent
d5c123622b
commit
5d6716da67
+1
@@ -57,6 +57,7 @@ interface MatrixRoom : Closeable {
|
||||
val isDm: Boolean get() = isDirect && isOneToOne
|
||||
|
||||
val roomInfoFlow: Flow<MatrixRoomInfo>
|
||||
val roomTypingMembersFlow: Flow<List<UserId>>
|
||||
|
||||
/**
|
||||
* A one-to-one is a room with exactly 2 members.
|
||||
|
||||
+13
-1
@@ -27,7 +27,19 @@ data class RoomMember(
|
||||
val powerLevel: Long,
|
||||
val normalizedPowerLevel: Long,
|
||||
val isIgnored: Boolean,
|
||||
)
|
||||
) {
|
||||
/**
|
||||
* Disambiguated display name for the RoomMember.
|
||||
* If the display name is null, the user ID is returned.
|
||||
* If the display name is ambiguous, the user ID is appended in parentheses.
|
||||
* Otherwise, the display name is returned.
|
||||
*/
|
||||
val disambiguatedDisplayName: String = when {
|
||||
displayName == null -> userId.value
|
||||
isNameAmbiguous -> "$displayName ($userId)"
|
||||
else -> displayName
|
||||
}
|
||||
}
|
||||
|
||||
enum class RoomMembershipState {
|
||||
BAN,
|
||||
|
||||
Reference in New Issue
Block a user