Only show modified files notification if site is owned

This commit is contained in:
shortcutme 2019-02-05 15:55:12 +01:00
parent eb837e3685
commit 40f732cd48
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 2 additions and 2 deletions

View file

@ -191,7 +191,7 @@ class Wrapper
@actionRequestFullscreen()
else # Send to websocket
if message.id < 1000000
if message.cmd == "fileWrite" and not @modified_panel_updater_timer
if message.cmd == "fileWrite" and not @modified_panel_updater_timer and site_info?.settings?.own
@modified_panel_updater_timer = setTimeout ( => @updateModifiedPanel(); @modified_panel_updater_timer = null ), 1000
@ws.send(message) # Pass message to websocket
else

View file

@ -1172,7 +1172,7 @@ $.extend( $.easing,
return this.actionRequestFullscreen();
} else {
if (message.id < 1000000) {
if (message.cmd === "fileWrite" && !this.modified_panel_updater_timer) {
if (message.cmd === "fileWrite" && !this.modified_panel_updater_timer && (typeof site_info !== "undefined" && site_info !== null ? (ref = site_info.settings) != null ? ref.own : void 0 : void 0)) {
this.modified_panel_updater_timer = setTimeout(((function(_this) {
return function() {
_this.updateModifiedPanel();