mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Room list notifications tweaks (#6106)
We decided against changing how unread activity is rendered in the room list, so the experiment and its developer option are no longer needed. we have also added a notification settings entry for hiding the room list gray dots.
This commit is contained in:
@@ -104,8 +104,6 @@ struct HomeScreenViewState: BindableState {
|
||||
|
||||
var hideInviteAvatars = false
|
||||
|
||||
var roomListActivityVisibility: RoomListActivityVisibility = .current
|
||||
|
||||
var reportRoomEnabled = false
|
||||
|
||||
var shouldShowSpaceFilters = false
|
||||
@@ -199,8 +197,6 @@ struct HomeScreenRoom: Identifiable, Equatable {
|
||||
let callBadgeType: CallBadgeType
|
||||
}
|
||||
|
||||
var hasUnreads = false
|
||||
|
||||
let name: String
|
||||
|
||||
let isDirect: Bool
|
||||
@@ -255,16 +251,15 @@ struct HomeScreenRoom: Identifiable, Equatable {
|
||||
|
||||
extension HomeScreenRoom {
|
||||
init(summary: RoomSummary,
|
||||
roomListActivityVisibility: RoomListActivityVisibility = .current,
|
||||
showAllActivity: Bool = true,
|
||||
seenInvites: Set<String> = []) {
|
||||
let roomID = summary.id
|
||||
|
||||
let isUnseenInvite = summary.joinRequestType?.isInvite == true && !seenInvites.contains(roomID)
|
||||
|
||||
let isDotShown = switch roomListActivityVisibility {
|
||||
case .current:
|
||||
let isDotShown = if showAllActivity {
|
||||
summary.hasUnreadMessages || summary.hasUnreadMentions || summary.hasUnreadNotifications || summary.isMarkedUnread || isUnseenInvite
|
||||
case .hide, .show:
|
||||
} else {
|
||||
(!summary.isMuted && (summary.hasUnreadNotifications || summary.hasUnreadMentions)) || summary.isMarkedUnread || isUnseenInvite
|
||||
}
|
||||
|
||||
@@ -292,7 +287,6 @@ extension HomeScreenRoom {
|
||||
isMentionShown: isMentionShown,
|
||||
isMuteShown: isMuteShown,
|
||||
callBadgeType: callBadge),
|
||||
hasUnreads: summary.hasUnreadMessages,
|
||||
name: summary.name,
|
||||
isDirect: summary.isDirect,
|
||||
isHighlighted: isHighlighted,
|
||||
|
||||
Reference in New Issue
Block a user