# 标签通知未清除

**URL:** https://meta.discourse.org/t/tab-notifications-not-clearing/160750
**Category:** Bug
**Created:** [2020年八月13日 15:08 UTC](https://meta.discourse.org/t/tab-notifications-not-clearing/160750 "2020-08-13T15:08:27Z")
**Posts on this page:** 6
**Page:** 2

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年十月7日 19:37 UTC](https://meta.discourse.org/t/tab-notifications-not-clearing/160750/24 "2020-10-07T19:37:19Z")

</div>

@Slowhand 能请你测试一个假设吗？我认为这仅出现在在个人资料设置中启用了“在浏览器图标上显示计数”的用户。能否尝试禁用该选项，看看问题是否消失？

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [2020年十月7日 20:43 UTC](https://meta.discourse.org/t/tab-notifications-not-clearing/160750/25 "2020-10-07T20:43:19Z")

</div>

我可以确认情况确实如此。当“在浏览器图标上显示计数”未勾选时，标签页计数通知按预期工作。

在普通（未固定）标签页中，当“在浏览器图标上显示计数”未勾选时：  
 ![Screen Shot 2020-10-07 at 1.38.34 PM](https://global.discourse-cdn.com/meta/original/3X/f/f/ff3a120405d654532d98a5de2f9c2e13c2eb485c.png)

当标签页被固定时不显示计数：  
 ![Screen Shot 2020-10-07 at 1.38.56 PM](https://global.discourse-cdn.com/meta/original/3X/8/5/858fb45db16f330f7625d91dae01a73ea719a0b1.png)

对比“在浏览器图标上显示计数”已勾选的情况：  
 ![Screen Shot 2020-10-07 at 1.41.57 PM](https://global.discourse-cdn.com/meta/original/3X/a/3/a39a0206690dfb37ed61979ca7caab0b28c8a622.png)  
 ![Screen Shot 2020-10-07 at 1.41.40 PM](https://global.discourse-cdn.com/meta/original/3X/1/6/16d79ba59cb44c2b378bcd830c906af06336ee3f.png)

---

<div class="post-metadata">

### Author: ![Slowhand](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/slowhand/32/57436_2.png) [@Slowhand](https://meta.discourse.org/u/Slowhand)
#### Post date: [2020年十月7日 22:37 UTC](https://meta.discourse.org/t/tab-notifications-not-clearing/160750/27 "2020-10-07T22:37:35Z")

</div>

我花了一点时间才收到一些通知，看来周三下午并不是测试的好时机。

不过我可以确认它运行正常。我收到了通知，点击标签页后它们就消失了。

我打开了两个标签页以便截图。

![image](https://global.discourse-cdn.com/meta/original/3X/0/1/0158ab8b295e4491c6aebdf2ccb3a38a71e9f9ed.png)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年十月8日 00:04 UTC](https://meta.discourse.org/t/tab-notifications-not-clearing/160750/28 "2020-10-08T00:04:08Z")

</div>

太好了，使用图标功能时我可以复现这个问题，我会查看一下。

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年十月8日 21:58 UTC](https://meta.discourse.org/t/tab-notifications-not-clearing/160750/29 "2020-10-08T21:58:15Z")

</div>

这样应该可以了

> <https://github.com/discourse/discourse/pull/10875>
>
> This misses a test because Favcount doesn't exposes a get to the counter.
> 
> Als…o, since this code deals with all possible notifications configs we support:
> 
> \- favicon notification
> \- favicon new content
> \- title notification
> \- title new content
> 
> the code is a bit complicated to follow. We may look into refactoring it when a
> good opportunity arises, like if https://w3c.github.io/badging/ setClientBadge() method
> gives us a cleaner way to notify users.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2020年十月13日 02:55 UTC](https://meta.discourse.org/t/tab-notifications-not-clearing/160750/30 "2020-10-13T02:55:33Z")

</div>



[上一頁](https://meta.discourse.org/t/tab-notifications-not-clearing/160750.md?page=1)
