Replace 'leave room' text with 'leave conversation' for DMs (#2231)

* Replace 'leave room' text with 'leave conversation' for DMs

* Add `isDm` property to both `RoomSummary` and `RoomListRoomSummary`

* Remove redundant `leave_conversation_alert_subtitle_*` texts

* Fix maestro flow

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Jorge Martin Espinosa 2024-01-16 15:49:44 +01:00 committed by GitHub
parent d7dcd7aa34
commit 27f55c0bc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 115 additions and 19 deletions

View file

@ -52,6 +52,9 @@ interface MatrixRoom : Closeable {
val activeMemberCount: Long
val joinedMemberCount: Long
/** Whether the room is a direct message. */
val isDm: Boolean get() = isDirect && isOneToOne
val roomInfoFlow: Flow<MatrixRoomInfo>
/**

View file

@ -45,4 +45,5 @@ data class RoomSummaryDetails(
val inviter: RoomMember? = null,
val notificationMode: RoomNotificationMode? = null,
val hasOngoingCall: Boolean = false,
val isDm: Boolean = false,
)

View file

@ -41,6 +41,7 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto
inviter = roomInfo.inviter?.let(RoomMemberMapper::map),
notificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode),
hasOngoingCall = roomInfo.hasRoomCall,
isDm = roomInfo.isDirect && roomInfo.activeMembersCount.toLong() == 2L,
)
}
}

View file

@ -57,6 +57,7 @@
<string name="action_join">"Join"</string>
<string name="action_learn_more">"Learn more"</string>
<string name="action_leave">"Leave"</string>
<string name="action_leave_conversation">"Leave conversation"</string>
<string name="action_leave_room">"Leave room"</string>
<string name="action_manage_account">"Manage account"</string>
<string name="action_manage_devices">"Manage devices"</string>