fixed typing users issue

This commit is contained in:
Mirco Wittrien 2019-02-24 20:27:07 +01:00
parent 18c9f83cc6
commit 205def7414
3 changed files with 9 additions and 6 deletions

View File

@ -3,7 +3,7 @@
class EditUsers { class EditUsers {
getName () {return "EditUsers";} getName () {return "EditUsers";}
getVersion () {return "3.2.8";} getVersion () {return "3.2.9";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
@ -11,7 +11,7 @@ class EditUsers {
initConstructor () { initConstructor () {
this.changelog = { this.changelog = {
"fixed":[["ScreenShare","Avatar in the ScreenShare popout is now properly changed"]] "fixed":[["Typing Users","The plugin now properly changes the names in the typing users list"]]
}; };
this.labels = {}; this.labels = {};
@ -550,7 +550,7 @@ class EditUsers {
} }
processTypingUsers (instance, wrapper) { processTypingUsers (instance, wrapper) {
let users = !instance.state.typingUsers ? [] : Object.keys(instance.state.typingUsers).filter(id => id != BDFDB.myData.id).filter(id => !this.RelationshipUtils.isBlocked(id)).map(id => this.UserUtils.getUser(id)).filter(id => id != null); let users = !instance.props.typingUsers ? [] : Object.keys(instance.props.typingUsers).filter(id => id != BDFDB.myData.id).filter(id => !this.RelationshipUtils.isBlocked(id)).map(id => this.UserUtils.getUser(id)).filter(id => id != null);
wrapper.querySelectorAll(BDFDB.dotCNS.typing + "strong").forEach((username, i) => { wrapper.querySelectorAll(BDFDB.dotCNS.typing + "strong").forEach((username, i) => {
if (users[i] && username) this.changeName2(users[i], username); if (users[i] && username) this.changeName2(users[i], username);
}); });

View File

@ -3,13 +3,17 @@
class RemoveNicknames { class RemoveNicknames {
getName () {return "RemoveNicknames";} getName () {return "RemoveNicknames";}
getVersion () {return "1.1.4";} getVersion () {return "1.1.5";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
getDescription () {return "Replace all nicknames with the actual accountnames.";} getDescription () {return "Replace all nicknames with the actual accountnames.";}
initConstructor () { initConstructor () {
this.changelog = {
"fixed":[["Typing Users","The plugin now properly changes the names in the typing users list"]]
};
this.patchModules = { this.patchModules = {
"NameTag":"componentDidMount", "NameTag":"componentDidMount",
"TypingUsers":"componentDidUpdate", "TypingUsers":"componentDidUpdate",
@ -121,7 +125,7 @@ class RemoveNicknames {
} }
processTypingUsers (instance, wrapper) { processTypingUsers (instance, wrapper) {
let users = !instance.state.typingUsers ? [] : Object.keys(instance.state.typingUsers).filter(id => id != BDFDB.myData.id).filter(id => !this.RelationshipUtils.isBlocked(id)).map(id => this.UserUtils.getUser(id)).filter(id => id != null); let users = !instance.props.typingUsers ? [] : Object.keys(instance.props.typingUsers).filter(id => id != BDFDB.myData.id).filter(id => !this.RelationshipUtils.isBlocked(id)).map(id => this.UserUtils.getUser(id)).filter(id => id != null);
wrapper.querySelectorAll("strong").forEach((username, i) => { wrapper.querySelectorAll("strong").forEach((username, i) => {
if (users[i] && username) BDFDB.setInnerText(username, this.getNewName(users[i])); if (users[i] && username) BDFDB.setInnerText(username, this.getNewName(users[i]));
}); });

View File

@ -10,7 +10,6 @@
#app-mount .input-cIJ7To:hover { #app-mount .input-cIJ7To:hover {
border-color: #040405; border-color: #040405;
} }
#app-mount .backdrop-1wrmKB,
#app-mount .regionSelectModal-12e-57, #app-mount .regionSelectModal-12e-57,
#app-mount .wrapper-2ZbzR9, #app-mount .wrapper-2ZbzR9,
#app-mount .slide-2pHaq5 { #app-mount .slide-2pHaq5 {