Skip to content

Commit 8ce79fe

Browse files
authored
fix: only show showNotificationsCountInTray setting on MacOS (#1031)
1 parent e7dc36e commit 8ce79fe

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

src/routes/Settings.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const SettingsRoute: FC = () => {
3636
const navigate = useNavigate();
3737

3838
const [isLinux, setIsLinux] = useState<boolean>(false);
39+
const [isMacOS, setIsMacOS] = useState<boolean>(false);
3940
const [appVersion, setAppVersion] = useState<string | null>(null);
4041
const [repoScope, setRepoScope] = useState<boolean>(false);
4142

@@ -57,6 +58,7 @@ export const SettingsRoute: FC = () => {
5758
useEffect(() => {
5859
ipcRenderer.invoke('get-platform').then((result: string) => {
5960
setIsLinux(result === 'linux');
61+
setIsMacOS(result === 'darwin');
6062
});
6163

6264
ipcRenderer.invoke('get-app-version').then((result: string) => {
@@ -240,14 +242,19 @@ export const SettingsRoute: FC = () => {
240242
<legend id="system" className="font-semibold mt-2 mb-1">
241243
System
242244
</legend>
243-
<Checkbox
244-
name="showNotificationsCountInTray"
245-
label="Show notifications count in tray"
246-
checked={settings.showNotificationsCountInTray}
247-
onChange={(evt) =>
248-
updateSetting('showNotificationsCountInTray', evt.target.checked)
249-
}
250-
/>
245+
{isMacOS && (
246+
<Checkbox
247+
name="showNotificationsCountInTray"
248+
label="Show notifications count in tray"
249+
checked={settings.showNotificationsCountInTray}
250+
onChange={(evt) =>
251+
updateSetting(
252+
'showNotificationsCountInTray',
253+
evt.target.checked,
254+
)
255+
}
256+
/>
257+
)}
251258
<Checkbox
252259
name="showNotifications"
253260
label="Show system notifications"

0 commit comments

Comments
 (0)