aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.html
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-09-03 16:33:16 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-09-03 16:33:16 +0200
commita22f18094a64ff9359923c4a91ffbf81769d35f3 (patch)
tree6294b7332fbc29623d13532d48dd52fdd59de677 /src/index.html
parentAdd CTA for pro upgrade (diff)
parentMerge branch 'feature/todos' into develop (diff)
downloadferdium-app-a22f18094a64ff9359923c4a91ffbf81769d35f3.tar.gz
ferdium-app-a22f18094a64ff9359923c4a91ffbf81769d35f3.tar.zst
ferdium-app-a22f18094a64ff9359923c4a91ffbf81769d35f3.zip
Merge branch 'develop' into feature/new-pricing
Diffstat (limited to 'src/index.html')
-rw-r--r--src/index.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/index.html b/src/index.html
index f29aa2686..198c1ab7b 100644
--- a/src/index.html
+++ b/src/index.html
@@ -35,11 +35,16 @@
35 const originalReloadBehaviour = window._onLiveReloadFileChanged; 35 const originalReloadBehaviour = window._onLiveReloadFileChanged;
36 36
37 window._onLiveReloadFileChanged = (file) => { 37 window._onLiveReloadFileChanged = (file) => {
38 if (!file.path.includes('/build/webview/') && !file.path.includes('/build/index.js') && !file.path.includes('/build/electron/')) { 38 const isTodoPreloadPath = file.path.includes('/build/features/todos/preload.js');
39 if (!file.path.includes('/build/webview/') && !file.path.includes('/build/index.js') && !file.path.includes('/build/electron/') && !isTodoPreloadPath) {
39 originalReloadBehaviour(file); 40 originalReloadBehaviour(file);
40 } else { 41 } else {
41 if (file.path.includes('/build/webview/')) { 42 if (isTodoPreloadPath) {
42 debug('Livereload: Reloading all webvies'); 43 debug('Livereload: Reloading all webviews');
44 const webview = document.querySelector('webview[partition="persist:todos"]');
45 if (webview) webview.reload();
46 } else if (file.path.includes('/build/webview/')) {
47 debug('Livereload: Reloading all webviews');
43 const webviews = document.querySelectorAll('webview').forEach(webview => webview.reload()); 48 const webviews = document.querySelectorAll('webview').forEach(webview => webview.reload());
44 } else { 49 } else {
45 debug('Livereload: skip reload as only main process files have changed'); 50 debug('Livereload: skip reload as only main process files have changed');