Merge pull request #1962 from vector-im/feature/membership_state_event
A Kick appears has "someone has made no change" (Fixes #1959)
This commit is contained in:
commit
2acda2c5da
|
@ -22,6 +22,7 @@ Bugfix 🐛:
|
||||||
- Fix crash reported by RageShake
|
- Fix crash reported by RageShake
|
||||||
- Fix refreshing of sessions list when another session is logged out
|
- Fix refreshing of sessions list when another session is logged out
|
||||||
- Failed to build unique file (#1954)
|
- Failed to build unique file (#1954)
|
||||||
|
- A Kick appears has "someone has made no change" (#1959)
|
||||||
|
|
||||||
Translations 🗣:
|
Translations 🗣:
|
||||||
- Add PlayStore description resources in the Triple-T format, to let Weblate handle them
|
- Add PlayStore description resources in the Triple-T format, to let Weblate handle them
|
||||||
|
|
|
@ -327,6 +327,7 @@ class NoticeEventFormatter @Inject constructor(private val activeSessionDataSour
|
||||||
val eventContent: RoomMemberContent? = event.getClearContent().toModel()
|
val eventContent: RoomMemberContent? = event.getClearContent().toModel()
|
||||||
val prevEventContent: RoomMemberContent? = event.resolvedPrevContent().toModel()
|
val prevEventContent: RoomMemberContent? = event.resolvedPrevContent().toModel()
|
||||||
val isMembershipEvent = prevEventContent?.membership != eventContent?.membership
|
val isMembershipEvent = prevEventContent?.membership != eventContent?.membership
|
||||||
|
|| eventContent?.membership == Membership.LEAVE
|
||||||
return if (isMembershipEvent) {
|
return if (isMembershipEvent) {
|
||||||
buildMembershipNotice(event, senderName, eventContent, prevEventContent)
|
buildMembershipNotice(event, senderName, eventContent, prevEventContent)
|
||||||
} else {
|
} else {
|
||||||
|
@ -569,6 +570,7 @@ class NoticeEventFormatter @Inject constructor(private val activeSessionDataSour
|
||||||
sp.getString(R.string.notice_room_withdraw_with_reason, senderDisplayName, targetDisplayName, reason)
|
sp.getString(R.string.notice_room_withdraw_with_reason, senderDisplayName, targetDisplayName, reason)
|
||||||
} ?: sp.getString(R.string.notice_room_withdraw, senderDisplayName, targetDisplayName)
|
} ?: sp.getString(R.string.notice_room_withdraw, senderDisplayName, targetDisplayName)
|
||||||
}
|
}
|
||||||
|
Membership.LEAVE,
|
||||||
Membership.JOIN ->
|
Membership.JOIN ->
|
||||||
if (event.isSentByCurrentUser()) {
|
if (event.isSentByCurrentUser()) {
|
||||||
eventContent.safeReason?.let { reason ->
|
eventContent.safeReason?.let { reason ->
|
||||||
|
|
Loading…
Reference in New Issue