Partial Revert "Conversation: Wait for database fetch to add incoming messages"
This partially reverts commit bce711c36dfdb3eefda59a10aabe71058b3e40a2.
This commit is contained in:
parent
55eff02872
commit
8dbbde6790
1 changed files with 1 additions and 8 deletions
|
@ -47,15 +47,8 @@ function initialize({ events, storage, navigator, logger }) {
|
|||
);
|
||||
const expires = decoded.expires.toNumber();
|
||||
|
||||
// If we have a time in place and it's already before the safety zone before expire,
|
||||
// we keep it
|
||||
if (scheduledTime && scheduledTime <= expires - MINIMUM_TIME_LEFT) {
|
||||
setTimeoutForNextRun(scheduledTime);
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, we reset every day, or earlier if the safety zone requires it
|
||||
const time = Math.min(now + ONE_DAY, expires - MINIMUM_TIME_LEFT);
|
||||
|
||||
setTimeoutForNextRun(time);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue