mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-02 00:07:56 +01:00
Simplify TaskWithTimeout
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
@@ -60,7 +60,7 @@ import { writeProfile } from '../../services/writeProfile.preload.js';
|
||||
import { keyTransparency } from '../../services/keyTransparency.preload.js';
|
||||
import { getConversation } from '../../util/getConversation.preload.js';
|
||||
import { waitForEvent } from '../../shims/events.dom.js';
|
||||
import { DAY, MINUTE } from '../../util/durations/index.std.js';
|
||||
import { DAY } from '../../util/durations/index.std.js';
|
||||
import { sendSyncRequests } from '../../textsecure/syncRequests.preload.js';
|
||||
import { SmartUpdateDialog } from './UpdateDialog.preload.js';
|
||||
import { Preferences } from '../../components/Preferences.dom.js';
|
||||
@@ -258,10 +258,7 @@ export function SmartPreferences(): React.JSX.Element | null {
|
||||
// The weird ones
|
||||
|
||||
const makeSyncRequest = async () => {
|
||||
const contactSyncComplete = waitForEvent(
|
||||
'contactSync:complete',
|
||||
5 * MINUTE
|
||||
);
|
||||
const contactSyncComplete = waitForEvent('contactSync:complete');
|
||||
return Promise.all([sendSyncRequests(), contactSyncComplete]);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user