Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-01-13 20:26:38 +0300
committerJulius Härtl <jus@bitgrid.net>2021-01-13 21:34:03 +0300
commit12b42d11f977f4895cb782dd0bcdfc756e9e6187 (patch)
treee799aed117ecc8e30c9bd6e29c4156791f976bbd /src/extensions
parent49f2f80fa4c31acd7e91599110c7c123c41b6924 (diff)
Always use the updated color depending on the guest name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/extensions')
-rw-r--r--src/extensions/UserColor.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/extensions/UserColor.js b/src/extensions/UserColor.js
index 2dd786b18..d359b3443 100644
--- a/src/extensions/UserColor.js
+++ b/src/extensions/UserColor.js
@@ -73,10 +73,11 @@ export default class UserColor extends Extension {
.filter(span => typeof tState.commits[span.commit]?.author?.color !== 'undefined')
.map(span => {
const commit = tState.commits[span.commit]
+ const clientID = commit.author.clientID
return Decoration.inline(span.from, span.to, {
class: 'author-annotation',
- style: 'background-color: ' + commit.author.color + 'ee;',
- title: commit.author.name,
+ style: 'background-color: ' + this.spec.color(clientID) + 'ee;',
+ title: this.spec.name(clientID),
})
}).filter(dec => dec !== null)
return { tracked, deco: DecorationSet.create(state.doc, decos) }