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