Fix service view getting stuck

This commit is contained in:
Alice Gaudon 2020-01-21 21:27:48 +01:00
parent 1175024af2
commit dd053f9019

View File

@ -346,10 +346,11 @@ function loadService(serviceId, service) {
} }
document.querySelector('#services > .loader').classList.add('hidden'); document.querySelector('#services > .loader').classList.add('hidden');
updateNavigation();
service.li.classList.add('loaded'); service.li.classList.add('loaded');
service.viewReady = true; service.viewReady = true;
updateNavigation();
if (selectedService === null) { if (selectedService === null) {
setActiveService(serviceId); setActiveService(serviceId);
} }
@ -438,7 +439,7 @@ function updateNavigation() {
function updateWindowTitle() { function updateWindowTitle() {
if (selectedService === null) { if (selectedService === null) {
ipcRenderer.send('updateWindowTitle', null); ipcRenderer.send('updateWindowTitle', null);
} else { } else if(services[selectedService].viewReady) {
ipcRenderer.send('updateWindowTitle', selectedService, services[selectedService].view.getWebContents().getTitle()); ipcRenderer.send('updateWindowTitle', selectedService, services[selectedService].view.getWebContents().getTitle());
} }
} }