This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
components/views/spaces/threads-activity-centre
test/components/views/spaces/__snapshots__ Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import { getKeyBindingsManager } from "../../../../KeyBindingsManager";
3636import { KeyBindingAction } from "../../../../accessibility/KeyboardShortcuts" ;
3737import { ReleaseAnnouncement } from "../../../structures/ReleaseAnnouncement" ;
3838import { useIsReleaseAnnouncementOpen } from "../../../../hooks/useIsReleaseAnnouncementOpen" ;
39+ import { useSettingValue } from "../../../../hooks/useSettings" ;
3940
4041interface ThreadsActivityCentreProps {
4142 /**
@@ -52,6 +53,11 @@ export function ThreadsActivityCentre({ displayButtonLabel }: ThreadsActivityCen
5253 const [ open , setOpen ] = useState ( false ) ;
5354 const roomsAndNotifications = useUnreadThreadRooms ( open ) ;
5455 const isReleaseAnnouncementOpen = useIsReleaseAnnouncementOpen ( "threadsActivityCentre" ) ;
56+ const settingTACOnlyNotifs = useSettingValue < boolean > ( "Notifications.tac_only_notifications" ) ;
57+
58+ const emptyCaption = settingTACOnlyNotifs
59+ ? _t ( "threads_activity_centre|no_rooms_with_threads_notifs" )
60+ : _t ( "threads_activity_centre|no_rooms_with_unread_threads" ) ;
5561
5662 return (
5763 < div
@@ -110,9 +116,7 @@ export function ThreadsActivityCentre({ displayButtonLabel }: ThreadsActivityCen
110116 />
111117 ) ) }
112118 { roomsAndNotifications . rooms . length === 0 && (
113- < div className = "mx_ThreadsActivityCentre_emptyCaption" >
114- { _t ( "threads_activity_centre|no_rooms_with_unreads_threads" ) }
115- </ div >
119+ < div className = "mx_ThreadsActivityCentre_emptyCaption" > { emptyCaption } </ div >
116120 ) }
117121 </ div >
118122 </ Menu >
Original file line number Diff line number Diff line change 31673167 },
31683168 "threads_activity_centre" : {
31693169 "header" : " Threads activity" ,
3170- "no_rooms_with_unreads_threads" : " You don't have rooms with unread threads yet." ,
3170+ "no_rooms_with_threads_notifs" : " You don't have rooms with thread notifications yet." ,
3171+ "no_rooms_with_unread_threads" : " You don't have rooms with unread threads yet." ,
31713172 "release_announcement_description" : " Threads notifications have moved, find them here from now on." ,
31723173 "release_announcement_header" : " Threads Activity Centre"
31733174 },
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ exports[`ThreadsActivityCentre should match snapshot when empty 1`] = `
153153 <div
154154 class = " mx_ThreadsActivityCentre_emptyCaption"
155155 >
156- You don't have rooms with unread threads yet.
156+ You don't have rooms with thread notifications yet.
157157 </div >
158158 </div >
159159</div >
You can’t perform that action at this time.
0 commit comments