"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "js/settings_start.js" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

settings_start.js  (Signal-Desktop-1.35.2):settings_start.js  (Signal-Desktop-1.36.1)
/* global $, Whisper */ /* global $, Whisper */
$(document).on('keydown', e => { $(document).on('keydown', e => {
'use strict';
if (e.keyCode === 27) { if (e.keyCode === 27) {
window.closeSettings(); window.closeSettings();
} }
}); });
const $body = $(document.body); const $body = $(document.body);
async function applyTheme() { async function applyTheme() {
'use strict';
const theme = await window.getThemeSetting(); const theme = await window.getThemeSetting();
$body.removeClass('light-theme'); $body.removeClass('light-theme');
$body.removeClass('dark-theme'); $body.removeClass('dark-theme');
$body.addClass(`${theme === 'system' ? window.systemTheme : theme}-theme`); $body.addClass(`${theme === 'system' ? window.systemTheme : theme}-theme`);
} }
applyTheme(); applyTheme();
window.subscribeToSystemThemeChange(() => { window.subscribeToSystemThemeChange(() => {
'use strict';
applyTheme(); applyTheme();
}); });
// eslint-disable-next-line strict
const getInitialData = async () => ({ const getInitialData = async () => ({
deviceName: await window.getDeviceName(), deviceName: await window.getDeviceName(),
themeSetting: await window.getThemeSetting(), themeSetting: await window.getThemeSetting(),
hideMenuBar: await window.getHideMenuBar(), hideMenuBar: await window.getHideMenuBar(),
notificationSetting: await window.getNotificationSetting(), notificationSetting: await window.getNotificationSetting(),
audioNotification: await window.getAudioNotification(), audioNotification: await window.getAudioNotification(),
notificationDrawAttention: await window.getNotificationDrawAttention(), notificationDrawAttention: await window.getNotificationDrawAttention(),
skipping to change at line 60 skipping to change at line 53
isPrimary: await window.isPrimary(), isPrimary: await window.isPrimary(),
lastSyncTime: await window.getLastSyncTime(), lastSyncTime: await window.getLastSyncTime(),
}); });
window.initialRequest = getInitialData(); window.initialRequest = getInitialData();
// eslint-disable-next-line more/no-then // eslint-disable-next-line more/no-then
window.initialRequest.then( window.initialRequest.then(
data => { data => {
'use strict';
window.initialData = data; window.initialData = data;
window.view = new Whisper.SettingsView(); window.view = new Whisper.SettingsView();
window.view.$el.appendTo($body); window.view.$el.appendTo($body);
}, },
error => { error => {
'use strict';
window.log.error( window.log.error(
'settings.initialRequest error:', 'settings.initialRequest error:',
error && error.stack ? error.stack : error error && error.stack ? error.stack : error
); );
window.closeSettings(); window.closeSettings();
} }
); );
 End of changes. 6 change blocks. 
11 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)