limit notifications at statup.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Friends |
Fix Released
|
Medium
|
Robert Bruce Park | ||
friends (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The notify code that we're about to land has a tendency to spam a ton of notifications at startup, which is probably not helpful when users are just turning their computer on -- they're probably more interested in the wireless notification or whatever other boot-time things are happening.
So we need to come up with a way to suppress the notifications at launch, however this gets a bit tricky; the naive approach of initializing a flag to false, and then setting it true at the end of the first refresh would work for the moment, but this would end up being just another bit of code that will break when we eventually move to the event-based architecture. So with not-long-
The only thing I can think of, although this idea probably needs some finessing, is to instead check the system uptime, and only display notifications if uptime is greater than, say, 30 minutes.
Any thoughts on a) how to reliably check the system uptime in python, and b) what the correct length of notification-
Related branches
- Ken VanDine: Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 113 lines (+33/-4)2 files modifiedfriends/tests/test_notify.py (+24/-0)
friends/utils/base.py (+9/-4)
Changed in friends: | |
status: | Triaged → Fix Committed |
Changed in friends: | |
status: | Fix Committed → Fix Released |
Fix committed into lp:friends at revision 195, scheduled for release in friends, milestone Unknown