This commit is contained in:
Mirco Wittrien 2021-03-05 17:43:06 +01:00
parent c37fcbabc5
commit d64eb0624e
2 changed files with 7 additions and 4 deletions

View File

@ -5770,7 +5770,10 @@ module.exports = (_ => {
});
return this.props.switchOnClick ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Clickable, {
className: BDFDB.disCN.guildsummaryclickableicon,
onClick: _ => {LibraryModules.SelectChannelUtils.selectChannel(guild.id, LibraryModules.LastChannelStore.getChannelId(guild.id));},
onClick: _ => {
LibraryModules.GuildUtils.selectGuild(guild.id);
LibraryModules.ChannelUtils.selectChannel(guild.id, LibraryModules.LastChannelStore.getChannelId(guild.id));
},
key: guild.id,
tabIndex: -1,
children: icon

View File

@ -17,12 +17,12 @@ module.exports = (_ => {
"info": {
"name": "FriendNotifications",
"author": "DevilBro",
"version": "1.6.2",
"version": "1.6.3",
"description": "Shows a Notification when a Friend or a User, you choose to observe, changes their Status"
},
"changeLog": {
"fixed": {
"Add stranger by name#discrim": "Works again"
"Switch to DM": "CLicking a notification switches the channel again"
}
}
};
@ -763,7 +763,7 @@ module.exports = (_ => {
let openChannel = _ => {
if (settings.openOnClick) {
let DMid = BDFDB.LibraryModules.ChannelStore.getDMFromUserId(user.id)
if (DMid) BDFDB.LibraryModules.SelectChannelUtils.selectPrivateChannel(DMid);
if (DMid) BDFDB.LibraryModules.ChannelUtils.selectPrivateChannel(DMid);
else BDFDB.LibraryModules.DirectMessageUtils.openPrivateChannel(BDFDB.UserUtils.me.id, user.id);
BDFDB.LibraryModules.WindowUtils.focus();
}