Hide the friend button when the resquest is accepted

This commit is contained in:
yflory
2017-07-06 12:31:31 +02:00
parent 96fde4e5ed
commit 5b5a7ab286
5 changed files with 46 additions and 12 deletions

View File

@@ -219,6 +219,10 @@ define([
// Trigger userlist update when the avatar has changed
Cryptpad.changeDisplayName(proxy[Cryptpad.displayNameKey]);
});
proxy.on('change', ['friends'], function () {
// Trigger userlist update when the avatar has changed
Cryptpad.changeDisplayName(proxy[Cryptpad.displayNameKey]);
});
proxy.on('change', [tokenKey], function () {
var localToken = tryParsing(localStorage.getItem(tokenKey));
if (localToken !== proxy[tokenKey]) {