Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2025-01-27 00:23:40 -05:00
commit 8ac1f757d5

View file

@ -125,7 +125,7 @@ const settings = definePluginSettings({
default: true, default: true,
}, },
hideWithActivity: { hideWithActivity: {
description: "Hide Last.fm presence if any other activity is detected", description: "Hide Last.fm presence if you have any other presence",
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
default: false, default: false,
}, },
@ -286,13 +286,11 @@ export default definePlugin({
} }
if (settings.store.hideWithSpotify) { if (settings.store.hideWithSpotify) {
for (const activity of PresenceStore.getActivities()) { if (PresenceStore.getActivities().some(a => a.type === ActivityType.LISTENING && a.application_id !== applicationId)) {
if (activity.type === ActivityType.LISTENING && activity.application_id !== applicationId) {
// there is already music status because of Spotify or richerCider (probably more) // there is already music status because of Spotify or richerCider (probably more)
return null; return null;
} }
} }
}
const trackData = await this.fetchTrackData(); const trackData = await this.fetchTrackData();
if (!trackData) return null; if (!trackData) return null;