mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Show message counts on room list notification badges
This commit is contained in:
@@ -106,6 +106,8 @@ struct HomeScreenViewState: BindableState {
|
||||
|
||||
var roomListActivityVisibility: RoomListActivityVisibility = .current
|
||||
|
||||
var roomListNotificationCountEnabled = false
|
||||
|
||||
var reportRoomEnabled = false
|
||||
|
||||
var shouldShowSpaceFilters = false
|
||||
@@ -193,6 +195,7 @@ struct HomeScreenRoom: Identifiable, Equatable {
|
||||
let badges: Badges
|
||||
struct Badges: Equatable {
|
||||
let isDotShown: Bool
|
||||
let notificationCount: UInt
|
||||
let isMentionShown: Bool
|
||||
let isMuteShown: Bool
|
||||
let callBadgeType: CallBadgeType
|
||||
@@ -237,7 +240,7 @@ struct HomeScreenRoom: Identifiable, Equatable {
|
||||
HomeScreenRoom(id: UUID().uuidString,
|
||||
roomID: nil,
|
||||
type: .placeholder,
|
||||
badges: .init(isDotShown: false, isMentionShown: false, isMuteShown: false, callBadgeType: .none),
|
||||
badges: .init(isDotShown: false, notificationCount: 0, isMentionShown: false, isMuteShown: false, callBadgeType: .none),
|
||||
name: "Placeholder room name",
|
||||
isDirect: false,
|
||||
isHighlighted: false,
|
||||
@@ -287,6 +290,7 @@ extension HomeScreenRoom {
|
||||
roomID: summary.id,
|
||||
type: type,
|
||||
badges: .init(isDotShown: isDotShown,
|
||||
notificationCount: summary.unreadNotificationsCount,
|
||||
isMentionShown: isMentionShown,
|
||||
isMuteShown: isMuteShown,
|
||||
callBadgeType: callBadge),
|
||||
|
||||
Reference in New Issue
Block a user