Re: source.unseenCount's strange behavior



On Tue, Oct 2, 2012 at 3:50 PM, Giovanni Campagna
<scampa giovanni gmail com> wrote:
> It's very possible that there is a bug, as that count is used by the
> screen lock and only for non resident notifications. It would be very
> helpful if you could debug, or otherwise just look at
> js/ui/screenShield.js : NotificationBox for code to filter out
> resident sources, as I understand you don't want to show them anyway.

I took a look at the screenShield's NotificationBox. The way it
filters notifications is very close to what I'm doing: It doesn't
consider chat notifications as resident (like I do, even though it's
marked as resident on 'resident' flag) so maybe that's the reason it's
masking the bug on non chat resident notifications =P

The problem is that the unseenCount of resident notifications (is it
all of them or just rhythmbox's ones?) isn't being updated. It's
calculated by getting the number of notifications that has the
'acknowledged' flag set to false[1]. And it doesn't matter if I click
on the notification icon and then dismiss it clicking directly on it
(instead of closing at the 'x'), it'll always return 1 (where on a
chat notification, it returns to 0 after I click it).

Maybe notifications should be marked as 'acknowledged' even if they
are resident? Or unseenCount shouldn't take resident notifications in
consideration? It's just strange to see a notification like rhythmbox
(that isn't supposed to be dismissed) never being acknowledged and
it's source always saying that there is one unseen notification there.

[1] http://git.gnome.org/browse/gnome-shell/tree/js/ui/messageTray.js#n1064

Thanks,

-- 
Thiago Bellini | http://hackedbellini.org

“Real knowledge is to know the extent of one's ignorance.” - Confucius


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]