mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-11-05 11:15:18 +01:00
Merge pull request #448 from autumn-puffin/master
Add option to disable the discord rpc idle text
This commit is contained in:
@@ -14,6 +14,10 @@ export let rpc: Client;
|
||||
|
||||
const observer = () => {
|
||||
if (rpc) {
|
||||
const showIdle = settingsStore.get<string, boolean>(settings.discord.showIdle) ?? true;
|
||||
if (mediaInfo.status === MediaStatus.paused && !showIdle) {
|
||||
rpc.clearActivity();
|
||||
} else
|
||||
rpc.setActivity(getActivity());
|
||||
}
|
||||
};
|
||||
@@ -95,6 +99,10 @@ export const initRPC = () => {
|
||||
rpc.login({ clientId }).then(
|
||||
() => {
|
||||
rpc.on("ready", () => {
|
||||
const showIdle = settingsStore.get<string, boolean>(settings.discord.showIdle) ?? true;
|
||||
if (mediaInfo.status === MediaStatus.paused && !showIdle) {
|
||||
rpc.clearActivity();
|
||||
} else
|
||||
rpc.setActivity(getActivity());
|
||||
});
|
||||
ipcMain.on(globalEvents.updateInfo, observer);
|
||||
|
||||
Reference in New Issue
Block a user