summaryrefslogtreecommitdiffstats
path: root/browser/src/map/handler
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-11-18 09:46:03 -0400
committerAndras Timar <andras.timar@collabora.com>2021-11-19 19:37:44 +0100
commit48de06037f2d5dff70d9f9f373669dc8d6f1bc17 (patch)
tree9cbf1df3981ab2d737f5400f64f6a293c70655c3 /browser/src/map/handler
parentfeedback: increase a day when "later" button is pushed (diff)
downloadonline-48de06037f2d5dff70d9f9f373669dc8d6f1bc17.tar.gz
online-48de06037f2d5dff70d9f9f373669dc8d6f1bc17.zip
feedback: show only to the main user in a multi-user document
case. Change-Id: Ia779d95cba6aec69207239420012f926a3ba93ad Signed-off-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'browser/src/map/handler')
-rw-r--r--browser/src/map/handler/Map.Feedback.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/browser/src/map/handler/Map.Feedback.js b/browser/src/map/handler/Map.Feedback.js
index 1837148d93..1bdc9abff7 100644
--- a/browser/src/map/handler/Map.Feedback.js
+++ b/browser/src/map/handler/Map.Feedback.js
@@ -12,7 +12,11 @@ L.Map.mergeOptions({
L.Map.Feedback = L.Handler.extend({
addHooks: function () {
- this._map.on('docloaded', this.onDocLoaded, this);
+ if (this._map.wopi)
+ this._map.on('updateviewslist', this.onUpdateList, this);
+ else
+ this._map.on('docloaded', this.onDocLoaded, this);
+
L.DomEvent.on(window, 'message', this.onMessage, this);
},
@@ -20,6 +24,13 @@ L.Map.Feedback = L.Handler.extend({
L.DomEvent.off(window, 'message', this.onMessage, this);
},
+ onUpdateList: function () {
+ var docLayer = this._map._docLayer || {};
+
+ if (docLayer && docLayer._viewId == 0)
+ this.onDocLoaded();
+ },
+
onDocLoaded: function () {
if (window.localStorage.getItem('WSDFeedbackEnabled') !== 'false') {
var currentDate = new Date();