stuff
This commit is contained in:
parent
79ada8cd6a
commit
2be5c8d8bc
|
@ -2,7 +2,7 @@
|
|||
* @name EditChannels
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 4.3.3
|
||||
* @version 4.3.4
|
||||
* @description Allows you to locally edit Channels
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,7 +17,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "EditChannels",
|
||||
"author": "DevilBro",
|
||||
"version": "4.3.3",
|
||||
"version": "4.3.4",
|
||||
"description": "Allows you to locally edit Channels"
|
||||
},
|
||||
"changeLog": {
|
||||
|
@ -540,6 +540,29 @@ module.exports = (_ => {
|
|||
}
|
||||
}
|
||||
|
||||
processPrivateChannel (e) {
|
||||
if (typeof e.returnvalue.props.children == "function") {
|
||||
let childrenRender = e.returnvalue.props.children;
|
||||
e.returnvalue.props.children = BDFDB.TimeUtils.suppress((...args) => {
|
||||
let children = childrenRender(...args);
|
||||
this._processPrivateChannel(e.instance, children);
|
||||
return children;
|
||||
}, "", this);
|
||||
}
|
||||
else this._processPrivateChannel(e.instance, e.returnvalue);
|
||||
}
|
||||
|
||||
_processPrivateChannel (instance, returnvalue) {
|
||||
if (instance.props.channel && instance.props.channel.isGroupDM() && this.settings.places.channelList) {
|
||||
if (changedChannels[instance.props.channel.id] && changedChannels[instance.props.channel.id].name) {
|
||||
returnvalue.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getGroupName(instance.props.channel.id)});
|
||||
}
|
||||
this.changeChannelColor(returnvalue.props.name, instance.props.channel.id, {modify: BDFDB.ObjectUtils.extract(Object.assign({}, instance.props, instance.state), "hovered", "selected", "hasUnreadMessages", "muted")});
|
||||
returnvalue.props.name = [returnvalue.props.name];
|
||||
returnvalue.props.avatar.props.src = this.getGroupIcon(instance.props.channel.id);
|
||||
}
|
||||
}
|
||||
|
||||
processPrivateChannel (e) {
|
||||
if (e.instance.props.channel && e.instance.props.channel.isGroupDM() && this.settings.places.channelList) {
|
||||
if (changedChannels[e.instance.props.channel.id] && changedChannels[e.instance.props.channel.id].name) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name EditUsers
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 4.4.3
|
||||
* @version 4.4.4
|
||||
* @description Allows you to locally edit Users
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,13 +17,8 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "EditUsers",
|
||||
"author": "DevilBro",
|
||||
"version": "4.4.3",
|
||||
"version": "4.4.4",
|
||||
"description": "Allows you to locally edit Users"
|
||||
},
|
||||
"changeLog": {
|
||||
"fixed": {
|
||||
"Banner": "Work again"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1072,7 +1067,7 @@ module.exports = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
processPrivateChannel (e) {
|
||||
if (e.instance.props.user && this.settings.places.dmsList && changedUsers[e.instance.props.user.id]) {
|
||||
if (!e.returnvalue) {
|
||||
|
@ -1084,15 +1079,27 @@ module.exports = (_ => {
|
|||
}
|
||||
}
|
||||
else {
|
||||
e.returnvalue.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getUserData(e.instance.props.user.id).username});
|
||||
this.changeUserColor(e.returnvalue.props.name, e.instance.props.user.id, {modify: BDFDB.ObjectUtils.extract(Object.assign({}, e.instance.props, e.instance.state), "hovered", "selected", "hasUnreadMessages", "muted")});
|
||||
e.returnvalue.props.avatar.props.src = this.getUserAvatar(e.instance.props.user.id);
|
||||
e.returnvalue.props.decorators = [e.returnvalue.props.decorators].flat(10);
|
||||
this.injectBadge(e.returnvalue.props.decorators, e.instance.props.user.id, null, 1);
|
||||
if (typeof e.returnvalue.props.children == "function") {
|
||||
let childrenRender = e.returnvalue.props.children;
|
||||
e.returnvalue.props.children = BDFDB.TimeUtils.suppress((...args) => {
|
||||
let children = childrenRender(...args);
|
||||
this._processPrivateChannel(e.instance, children);
|
||||
return children;
|
||||
}, "", this);
|
||||
}
|
||||
else this._processPrivateChannel(e.instance, e.returnvalue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_processPrivateChannel (instance, returnvalue) {
|
||||
returnvalue.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getUserData(instance.props.user.id).username});
|
||||
this.changeUserColor(returnvalue.props.name, instance.props.user.id, {modify: BDFDB.ObjectUtils.extract(Object.assign({}, instance.props, instance.state), "hovered", "selected", "hasUnreadMessages", "muted")});
|
||||
returnvalue.props.avatar.props.src = this.getUserAvatar(instance.props.user.id);
|
||||
returnvalue.props.decorators = [returnvalue.props.decorators].flat(10);
|
||||
this.injectBadge(returnvalue.props.decorators, instance.props.user.id, null, 1);
|
||||
}
|
||||
|
||||
processQuickSwitchUserResult (e) {
|
||||
if (e.instance.props.user && this.settings.places.quickSwitcher) {
|
||||
if (!e.returnvalue) e.instance.props.user = this.getUserData(e.instance.props.user.id);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name RemoveBlockedUsers
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.3.3
|
||||
* @version 1.3.4
|
||||
* @description Removes blocked Messages/Users
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,7 +17,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "RemoveBlockedUsers",
|
||||
"author": "DevilBro",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"description": "Removes blocked Messages/Users"
|
||||
}
|
||||
};
|
||||
|
@ -415,7 +415,17 @@ module.exports = (_ => {
|
|||
e.instance.props.channel = new BDFDB.DiscordObjects.Channel(Object.assign({}, e.instance.props.channel, {rawRecipients: e.instance.props.channel.rawRecipients.filter(n => !n || !BDFDB.LibraryModules.RelationshipStore.isBlocked(n.id)), recipients: e.instance.props.channel.recipients.filter(id => !id || !BDFDB.LibraryModules.RelationshipStore.isBlocked(id))}));
|
||||
}
|
||||
else {
|
||||
if (!e.instance.props.channel.name) e.returnvalue.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getGroupName(e.instance.props.channel.id)});
|
||||
if (!e.instance.props.channel.name) {
|
||||
if (typeof e.returnvalue.props.children == "function") {
|
||||
let childrenRender = e.returnvalue.props.children;
|
||||
e.returnvalue.props.children = BDFDB.TimeUtils.suppress((...args) => {
|
||||
let children = childrenRender(...args);
|
||||
children.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getGroupName(e.instance.props.channel.id)});
|
||||
return children;
|
||||
}, "", this);
|
||||
}
|
||||
else e.returnvalue.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getGroupName(e.instance.props.channel.id)});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name ShowBadgesInChat
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.8.1
|
||||
* @version 1.8.2
|
||||
* @description Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/DMList
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,13 +17,8 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "ShowBadgesInChat",
|
||||
"author": "DevilBro",
|
||||
"version": "1.8.1",
|
||||
"version": "1.8.2",
|
||||
"description": "Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/DMList"
|
||||
},
|
||||
"changeLog": {
|
||||
"fixed": {
|
||||
"Chat Position": "."
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -294,8 +289,19 @@ module.exports = (_ => {
|
|||
|
||||
processPrivateChannel (e) {
|
||||
if (!e.instance.props.user || !this.settings.places.dmsList) return;
|
||||
e.returnvalue.props.decorators = [e.returnvalue.props.decorators].flat(10);
|
||||
this.injectBadges(e.returnvalue.props.decorators, e.instance.props.user, null, "dms");
|
||||
if (typeof e.returnvalue.props.children == "function") {
|
||||
let childrenRender = e.returnvalue.props.children;
|
||||
e.returnvalue.props.children = BDFDB.TimeUtils.suppress((...args) => {
|
||||
let children = childrenRender(...args);
|
||||
children.props.decorators = [children.props.decorators].flat(10);
|
||||
this.injectBadges(children.props.decorators, e.instance.props.user, null, "dms");
|
||||
return children;
|
||||
}, "", this);
|
||||
}
|
||||
else {
|
||||
e.returnvalue.props.decorators = [e.returnvalue.props.decorators].flat(10);
|
||||
this.injectBadges(e.returnvalue.props.decorators, e.instance.props.user, null, "dms");
|
||||
}
|
||||
}
|
||||
|
||||
processUserProfileBadgeList (e) {
|
||||
|
|
Loading…
Reference in New Issue