[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 21 19:22:21 UTC 2019
loleaflet/src/layer/AnnotationManager.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 98ed3013a88bf1c0a489bdfbc92391517aca98d7
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Jan 21 20:18:50 2019 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Jan 21 20:20:07 2019 +0100
Show correct avatar during comment insertion
Change-Id: I86b373da8cf6f044fe745b00bc917787583780b9
diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js
index cc9615d32..339f3d269 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -827,12 +827,18 @@ L.AnnotationManager = L.Class.extend({
L.Map.include({
insertComment: function() {
+ var avatar = undefined;
+ var author = this.getViewName(this._docLayer._viewId);
+ if (author in this._viewInfoByUserName) {
+ avatar = this._viewInfoByUserName[author].userextrainfo.avatar;
+ }
this._docLayer.newAnnotation({
text: '',
textrange: '',
- author: this.getViewName(this._docLayer._viewId),
+ author: author,
dateTime: new Date().toDateString(),
- id: 'new' // 'new' only when added by us
+ id: 'new', // 'new' only when added by us
+ avatar: avatar
});
}
});
More information about the Libreoffice-commits
mailing list