signal-desktop/js
lilia 25ee61d3cb Fix timers after suspend/resume/pause
We use timers to decide when to query and delete expired messages or
when to perform signed key rotations.

Internally, timers are counters that get updated when the CPU ticks, so
if the CPU sleeps, the timer will stop counting, and start again after
it wakes up, ignoring the intervening passage of wall clock time.

To fix this, without having to query the database or other potentially
high overhead operations too often, use an interval to frequently check
the wall clock time. If time jumps forward, trigger a global event so
other listeners can update their possibly-inaccurate timers.

https://stackoverflow.com/questions/6346849/what-happens-to-settimeout-when-the-computer-goes-to-sleep
https://stackoverflow.com/questions/4079115/can-any-desktop-browsers-detect-when-the-computer-resumes-from-sleep

// FREEBIE
2017-03-01 14:36:40 -08:00
..
models Rework expiring messages management 2017-02-22 16:18:01 -08:00
views Rework expiring messages management 2017-02-22 16:18:01 -08:00
background.js Fix timers after suspend/resume/pause 2017-03-01 14:36:40 -08:00
chromium.js Drop chrome.runtime.onMessage events 2017-02-28 11:49:56 -08:00
components.js Update libphonenumber 2016-10-30 19:49:14 +09:00
conversation_controller.js Ensure that expired messages are removed from the frontend 2016-09-28 17:20:02 -07:00
conversation_panel.js Remove erroneous license file and headers 2015-09-07 14:58:42 -07:00
database.js Rework expiring messages management 2017-02-22 16:18:01 -08:00
debugLog.js Fix minor style errors 2016-02-18 13:45:22 -08:00
delivery_receipts.js Remove spurious update to conversation on delivery receipts 2017-02-22 15:41:12 -08:00
emoji_util.js Fix search tests 2016-09-01 14:01:51 -07:00
expire.js Add build support for expiring old releases 2016-04-03 20:55:53 -07:00
expiring_messages.js Fix timers after suspend/resume/pause 2017-03-01 14:36:40 -08:00
index.js Remove refs to appWindow 2016-10-07 11:02:26 +09:00
libphonenumber-util.js Refactor number parsing and validation 2015-12-09 18:58:51 -08:00
libsignal-protocol-worker.js Update libsignal-protocol v1.0.0 2016-06-14 16:27:34 -07:00
libtextsecure.js Fix key change errors while retrying key change errors 2017-02-22 01:17:21 -08:00
Mp3LameEncoder.min.js Add voice notes 2016-08-23 16:16:31 -07:00
notifications.js Add an option to play audio notifications 2017-02-02 09:00:14 -06:00
options.js Refactor registration event 2016-09-20 13:42:33 -07:00
panel_controller.js Clear window attention if all messages are marked read 2016-04-14 11:57:56 -07:00
read_receipts.js Use read receipt envelope to infer startExpirationTime 2016-09-28 17:20:02 -07:00
register.js Fix minor style errors 2016-02-18 13:45:22 -08:00
registration.js Refactor registration event 2016-09-20 13:42:33 -07:00
rotate_signed_prekey_listener.js Fix timers after suspend/resume/pause 2017-03-01 14:36:40 -08:00
signal_protocol_store.js Log session deletions 2017-02-28 11:29:26 -08:00
storage.js Log on failure to fetch storage 2016-08-11 12:22:32 -07:00
wall_clock_listener.js Fix timers after suspend/resume/pause 2017-03-01 14:36:40 -08:00
WebAudioRecorderMp3.js Add voice notes 2016-08-23 16:16:31 -07:00