TAC: Close Release Announcement when TAC button is clicked (#12475)

* Close RA when TAC button is clicked

* Update snapshots
This commit is contained in:
Florian Duros 2024-05-02 10:14:50 +02:00 committed by GitHub
parent ad7f626e22
commit 6a3741b779
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 136 additions and 29 deletions

View file

@ -37,6 +37,7 @@ import { KeyBindingAction } from "../../../../accessibility/KeyboardShortcuts";
import { ReleaseAnnouncement } from "../../../structures/ReleaseAnnouncement";
import { useIsReleaseAnnouncementOpen } from "../../../../hooks/useIsReleaseAnnouncementOpen";
import { useSettingValue } from "../../../../hooks/useSettings";
import { ReleaseAnnouncementStore } from "../../../../stores/ReleaseAnnouncementStore";
interface ThreadsActivityCentreProps {
/**
@ -85,6 +86,11 @@ export function ThreadsActivityCentre({ displayButtonLabel }: ThreadsActivityCen
disableTooltip={true}
displayLabel={displayButtonLabel}
notificationLevel={roomsAndNotifications.greatestNotificationLevel}
onClick={async () => {
// Open the TAC after the release announcement closing
setOpen(true);
await ReleaseAnnouncementStore.instance.nextReleaseAnnouncement();
}}
/>
</ReleaseAnnouncement>
) : (