mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[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:
@@ -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
|
||||
|
||||
@@ -39,6 +39,7 @@ export const ChatTabs = (props) => {
|
||||
key={page.id}
|
||||
selected={page === currentPage}
|
||||
rightSlot={
|
||||
!page.hideUnreadCount &&
|
||||
page.unreadCount > 0 && (
|
||||
<UnreadCountWidget value={page.unreadCount} />
|
||||
)
|
||||
|
||||
@@ -26,6 +26,7 @@ export const createPage = (obj) => {
|
||||
name: 'New Tab',
|
||||
acceptedTypes: acceptedTypes,
|
||||
unreadCount: 0,
|
||||
hideUnreadCount: false,
|
||||
createdAt: Date.now(),
|
||||
...obj,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user