Postpone routineProfileRefresh until empty
This commit is contained in:
parent
0923cc6cb8
commit
8ab4c4e78d
1 changed files with 17 additions and 17 deletions
|
@ -2190,23 +2190,6 @@ export async function startApp(): Promise<void> {
|
||||||
|
|
||||||
window.storage.onready(async () => {
|
window.storage.onready(async () => {
|
||||||
idleDetector.start();
|
idleDetector.start();
|
||||||
|
|
||||||
// Kick off a profile refresh if necessary, but don't wait for it, as failure is
|
|
||||||
// tolerable.
|
|
||||||
const ourConversationId =
|
|
||||||
window.ConversationController.getOurConversationId();
|
|
||||||
if (ourConversationId) {
|
|
||||||
routineProfileRefresh({
|
|
||||||
allConversations: window.ConversationController.getAll(),
|
|
||||||
ourConversationId,
|
|
||||||
storage: window.storage,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
assert(
|
|
||||||
false,
|
|
||||||
'Failed to fetch our conversation ID. Skipping routine profile refresh'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!challengeHandler) {
|
if (!challengeHandler) {
|
||||||
|
@ -2347,6 +2330,23 @@ export async function startApp(): Promise<void> {
|
||||||
window.reduxActions.crashReports.setCrashReportCount(
|
window.reduxActions.crashReports.setCrashReportCount(
|
||||||
await window.crashReports.getCount()
|
await window.crashReports.getCount()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Kick off a profile refresh if necessary, but don't wait for it, as failure is
|
||||||
|
// tolerable.
|
||||||
|
const ourConversationId =
|
||||||
|
window.ConversationController.getOurConversationId();
|
||||||
|
if (ourConversationId) {
|
||||||
|
routineProfileRefresh({
|
||||||
|
allConversations: window.ConversationController.getAll(),
|
||||||
|
ourConversationId,
|
||||||
|
storage: window.storage,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
assert(
|
||||||
|
false,
|
||||||
|
'Failed to fetch our conversation ID. Skipping routine profile refresh'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let initialStartupCount = 0;
|
let initialStartupCount = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue