mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-17 00:59:09 +02:00
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());
|
||||
}
|
||||
};
|
||||
@@ -90,6 +94,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