🎨 Format using ESLint

This commit is contained in:
Daniel Gasienica 2018-04-30 13:53:07 -04:00
parent d5fdf50fae
commit 6671228028

View file

@ -384,32 +384,37 @@
storage, storage,
}); });
console.log('Sync read receipt configuration status:', status); console.log('Sync read receipt configuration status:', status);
/* eslint-disable */
if (firstRun === true && deviceId != '1') { if (firstRun === true && deviceId !== '1') {
if (!storage.get('theme-setting') && textsecure.storage.get('userAgent') === 'OWI') { const hasThemeSetting = Boolean(storage.get('theme-setting'));
if (!hasThemeSetting && textsecure.storage.get('userAgent') === 'OWI') {
storage.put('theme-setting', 'ios'); storage.put('theme-setting', 'ios');
onChangeTheme(); onChangeTheme();
} }
var syncRequest = new textsecure.SyncRequest(textsecure.messaging, messageReceiver); const syncRequest = new textsecure.SyncRequest(
textsecure.messaging,
messageReceiver
);
Whisper.events.trigger('contactsync:begin'); Whisper.events.trigger('contactsync:begin');
syncRequest.addEventListener('success', function() { syncRequest.addEventListener('success', () => {
console.log('sync successful'); console.log('sync successful');
storage.put('synced_at', Date.now()); storage.put('synced_at', Date.now());
Whisper.events.trigger('contactsync'); Whisper.events.trigger('contactsync');
}); });
syncRequest.addEventListener('timeout', function() { syncRequest.addEventListener('timeout', () => {
console.log('sync timed out'); console.log('sync timed out');
Whisper.events.trigger('contactsync'); Whisper.events.trigger('contactsync');
}); });
if (Whisper.Import.isComplete()) { if (Whisper.Import.isComplete()) {
textsecure.messaging.sendRequestConfigurationSyncMessage().catch(function(e) { textsecure.messaging.sendRequestConfigurationSyncMessage().catch((e) => {
console.log(e); console.log(e);
}); });
} }
} }
} }
/* eslint-disable */
function onChangeTheme() { function onChangeTheme() {
var view = window.owsDesktopApp.appView; var view = window.owsDesktopApp.appView;