[MIRROR] porting the notification hiding from TG (#7737)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
CHOMPStation2
2024-02-13 20:48:51 -07:00
committed by GitHub
parent 19f2093971
commit 8c770e23d1
5 changed files with 1033 additions and 1015 deletions

View File

@@ -44,6 +44,22 @@ export const ChatPageSettings = (props) => {
}
/>
</Stack.Item>
<Stack.Item>
<Button.Checkbox
content="Mute"
checked={page.hideUnreadCount}
icon={page.hideUnreadCount ? 'bell-slash' : 'bell'}
tooltip="Disables unread counter"
onClick={() =>
dispatch(
updateChatPage({
pageId: page.id,
hideUnreadCount: !page.hideUnreadCount,
}),
)
}
/>
</Stack.Item>
{!page.isMain ? (
<Stack.Item>
<Button

View File

@@ -39,6 +39,7 @@ export const ChatTabs = (props) => {
key={page.id}
selected={page === currentPage}
rightSlot={
!page.hideUnreadCount &&
page.unreadCount > 0 && (
<UnreadCountWidget value={page.unreadCount} />
)

View File

@@ -26,6 +26,7 @@ export const createPage = (obj) => {
name: 'New Tab',
acceptedTypes: acceptedTypes,
unreadCount: 0,
hideUnreadCount: false,
createdAt: Date.now(),
...obj,
};