mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-11 18:57:44 +03:00
Hide "member made no changes" events in the timeline
Change-Id: Ia7016d46e5b6aebb94fe32d2602af829b37c9201
This commit is contained in:
parent
d309d0e396
commit
cd16168516
1 changed files with 3 additions and 1 deletions
|
@ -119,6 +119,8 @@ class TimelineEventVisibilityHelper @Inject constructor(private val userPreferen
|
|||
val diff = computeMembershipDiff()
|
||||
if ((diff.isJoin || diff.isPart) && !userPreferencesProvider.shouldShowJoinLeaves()) return true
|
||||
if ((diff.isAvatarChange || diff.isDisplaynameChange) && !userPreferencesProvider.shouldShowAvatarDisplayNameChanges()) return true
|
||||
// No change
|
||||
if (!diff.isJoin && !diff.isPart && !diff.isDisplaynameChange && !diff.isAvatarChange) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
@ -133,7 +135,7 @@ class TimelineEventVisibilityHelper @Inject constructor(private val userPreferen
|
|||
|
||||
val isProfileChanged = !isMembershipChanged && content?.membership == Membership.JOIN
|
||||
val isDisplaynameChange = isProfileChanged && content?.displayName != prevContent?.displayName
|
||||
val isAvatarChange = isProfileChanged && content?.avatarUrl !== prevContent?.avatarUrl
|
||||
val isAvatarChange = isProfileChanged && content?.avatarUrl != prevContent?.avatarUrl
|
||||
|
||||
return MembershipDiff(
|
||||
isJoin = isJoin,
|
||||
|
|
Loading…
Reference in a new issue