stuff
This commit is contained in:
parent
a4fa70adc3
commit
384a1af518
|
@ -7785,7 +7785,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
for (let type in InternalComponents.NativeSubComponents) if (InternalComponents.LibraryComponents[type]) for (let key in InternalComponents.NativeSubComponents[type]) if (key != "displayName" && key != "name" && (typeof InternalComponents.NativeSubComponents[type][key] != "function" || key.charAt(0) == key.charAt(0).toUpperCase())) {
|
for (let type in InternalComponents.NativeSubComponents) if (InternalComponents.LibraryComponents[type]) for (let key in InternalComponents.NativeSubComponents[type]) if (key != "displayName" && key != "name" && (typeof InternalComponents.NativeSubComponents[type][key] != "function" || key.charAt(0) == key.charAt(0).toUpperCase())) {
|
||||||
if (key == "defaultProps") InternalComponents.LibraryComponents[type][key] = Object.assign({}, InternalComponents.LibraryComponents[type][key], InternalComponents.NativeSubComponents[type][key]);
|
if (key == "defaultProps") InternalComponents.LibraryComponents[type][key] = Object.assign({}, InternalComponents.LibraryComponents[type][key], InternalComponents.NativeSubComponents[type][key]);
|
||||||
else InternalComponents.LibraryComponents[type][key] = InternalComponents.NativeSubComponents[type][key];
|
else if (!InternalComponents.LibraryComponents[type][key]) InternalComponents.LibraryComponents[type][key] = InternalComponents.NativeSubComponents[type][key];
|
||||||
}
|
}
|
||||||
BDFDB.LibraryComponents = Object.assign({}, InternalComponents.LibraryComponents);
|
BDFDB.LibraryComponents = Object.assign({}, InternalComponents.LibraryComponents);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name FriendNotifications
|
* @name FriendNotifications
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.7.7
|
* @version 1.7.8
|
||||||
* @description Shows a Notification when a Friend or a User, you choose to observe, changes their Status
|
* @description Shows a Notification when a Friend or a User, you choose to observe, changes their Status
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -17,13 +17,12 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "FriendNotifications",
|
"name": "FriendNotifications",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "1.7.7",
|
"version": "1.7.8",
|
||||||
"description": "Shows a Notification when a Friend or a User, you choose to observe, changes their Status"
|
"description": "Shows a Notification when a Friend or a User, you choose to observe, changes their Status"
|
||||||
},
|
},
|
||||||
"changeLog": {
|
"changeLog": {
|
||||||
"added": {
|
"fixed": {
|
||||||
"Time Log Option": "You can now disable the time log for users, in case you only want the time log for your important friends",
|
"Log In Option": "Now also works for Desktop Notifications"
|
||||||
"Log In Option": "You can now enable the login option, this will notify you in case a user changed his status from offline to any other status (so enabling only offline and login will only notify you about logout and logins, no notifications about status changes from example online to dnd)"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -849,7 +848,7 @@ module.exports = (_ => {
|
||||||
let user = BDFDB.LibraryModules.UserStore.getUser(id);
|
let user = BDFDB.LibraryModules.UserStore.getUser(id);
|
||||||
let status = this.getStatusWithMobileAndActivity(id, observedUsers[id], clientStatuses);
|
let status = this.getStatusWithMobileAndActivity(id, observedUsers[id], clientStatuses);
|
||||||
let customChanged = false, loginNotice = false;
|
let customChanged = false, loginNotice = false;
|
||||||
if (user && (!observedUsers[id][status.name] && observedUsers[id].login && status.name != "offline" && userStatusStore[id].name == "offline" && (loginNotice = true) || observedUsers[id][status.name] && (
|
if (user && (!observedUsers[id][status.name] && observedUsers[id].login && status.name != BDFDB.DiscordConstants.StatusTypes.OFFLINE && userStatusStore[id].name == BDFDB.DiscordConstants.StatusTypes.OFFLINE && (loginNotice = true) || observedUsers[id][status.name] && (
|
||||||
observedUsers[id].custom && (
|
observedUsers[id].custom && (
|
||||||
userStatusStore[id].custom != status.custom && ((customChanged = status.custom) || true) ||
|
userStatusStore[id].custom != status.custom && ((customChanged = status.custom) || true) ||
|
||||||
(customChanged = status.custom && !this.activityIsSame(id, status))
|
(customChanged = status.custom && !this.activityIsSame(id, status))
|
||||||
|
@ -891,7 +890,7 @@ module.exports = (_ => {
|
||||||
BDFDB.LibraryModules.WindowUtils.focus();
|
BDFDB.LibraryModules.WindowUtils.focus();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (observedUsers[id][status.name] == notificationTypes.DESKTOP.value) {
|
if ((loginNotice ? observedUsers[id].login : observedUsers[id][status.name]) == notificationTypes.DESKTOP.value) {
|
||||||
let desktopString = string.replace(/\$user/g, `${name}${this.settings.general.showDiscriminator ? ("#" + user.discriminator) : ""}`).replace(/\$statusOld/g, oldStatusName).replace(/\$status/g, statusName);
|
let desktopString = string.replace(/\$user/g, `${name}${this.settings.general.showDiscriminator ? ("#" + user.discriminator) : ""}`).replace(/\$statusOld/g, oldStatusName).replace(/\$status/g, statusName);
|
||||||
if (status.activity) desktopString = desktopString.replace(/\$song|\$game/g, status.activity.name || status.activity.details || "").replace(/\$artist|\$custom/g, [status.activity.emoji && status.activity.emoji.name, status.activity.state].filter(n => n).join(" ") || "");
|
if (status.activity) desktopString = desktopString.replace(/\$song|\$game/g, status.activity.name || status.activity.details || "").replace(/\$artist|\$custom/g, [status.activity.emoji && status.activity.emoji.name, status.activity.state].filter(n => n).join(" ") || "");
|
||||||
if (status.mobile) desktopString += " (mobile)";
|
if (status.mobile) desktopString += " (mobile)";
|
||||||
|
|
Loading…
Reference in New Issue