loleaflet/src/layer/AnnotationManager.js |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 2603d70039a17ee9ec627d776e2d7990e2ff82da
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Mon Jan 21 20:18:50 2019 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Jan 21 20:22:46 2019 +0100

    Show correct avatar during comment insertion
    
    Change-Id: I86b373da8cf6f044fe745b00bc917787583780b9
    Reviewed-on: https://gerrit.libreoffice.org/66698
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>

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
                });
        }
 });
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to