ncssar / radiolog

SAR radio log program
Other
13 stars 3 forks source link

hide and unhide of team tabs should preserve elapsed time since last contact #710

Closed caver456 closed 7 months ago

caver456 commented 7 months ago

Looks like the counter gets reset on hide and reset again on unhide. Also looks like the counter doesn't increment when the tab is hidden.

Timeout counters should always increment (except for 'At IC' status) regardless of whether the tab is hidden or not.

caver456 commented 7 months ago

Currently, when a tab is hidden, that entry is actually removed from teamTimersDict. When unhidden, it is added back to teamTimersDict with value 0.

caver456 commented 7 months ago

Looks like it's not as simple as "just don't delete the teamTimersDict entry", since the various lists and data structures are intercotwangulated with each other. So, there are two main options:

  1. "just don't delete the teamTimersDict entry" and then "patch" the other parts of the code that get confused when teamTimersDict is referenced for an entry that doesn't appear among the team tabs etc.

OR

  1. continue to delete from teamTimersDict, but, add another dict "hiddenTimersDict" to preserve the value upon hide, and to be incremented while hidden (as appropriate), and to restore upon unhide.

It's not clear if there's a winner between those two options. Maybe just pick one and go with it.

Continuing the count while hidden shouldn't be too hard. Implementing the orange and red alternate-second blinking within the sidebar might be more interesting .

caver456 commented 7 months ago

Went with option 1. Also, the orange and red blinking in the sidebar already works based on recent fix of #706.