Inconsistent message counts in notification and main window
What steps will reproduce the issue?
- Prime the cache with canned TMC data which contains cancellation messages.
- Connect to a real tuner and wait to pick up a TMC service.
- Check the message count in the notification and the main app window.
What behavior did you expect?
Same number of messages reported in both places.
What behavior are you seeing instead?
The notification occasionally reports more messages than the main app window.
What version of the software are you using? On what operating system (distribution and version)? Please also indicate related software which may be of importance here.
4ee73163 on LineageOS 15.1.
Other relevant information
Looking at the code the reason is obvious: TmcReceiver
, which generates the notification, simply takes the count from the message cache (which includes messages not visible in the UI, such as cancellations). MainActivity
, on the other hand, takes the count from the message adapter, which excludes cancellation messages.
Solving this issue boils down to a design decision: should cancellations be included in the message count or not?