diff --git a/src/pages/settings/GenericSettings.tsx b/src/pages/settings/GenericSettings.tsx
index 42dd9f97..c2b0dfee 100644
--- a/src/pages/settings/GenericSettings.tsx
+++ b/src/pages/settings/GenericSettings.tsx
@@ -26,6 +26,7 @@ interface Props {
id: string;
icon: Children;
title: Children;
+ hidden?: boolean;
hideTitle?: boolean;
}[];
custom?: Children;
@@ -51,15 +52,15 @@ export function GenericSettings({
const [closing, setClosing] = useState(false);
function exitSettings() {
- setClosing(true);
+ if (history.length > 1) {
+ setClosing(true);
- setTimeout(() => {
- if (history.length > 0) {
+ setTimeout(() => {
history.goBack();
- } else {
- history.push("/");
- }
- }, 100);
+ }, 100);
+ } else {
+ history.push("/");
+ }
}
useEffect(() => {
@@ -77,6 +78,7 @@ export function GenericSettings({
@@ -121,28 +123,30 @@ export function GenericSettings({
{(!isTouchscreenDevice || typeof page === "undefined") && (
- {pages.map((entry, i) => (
- <>
- {entry.category && (
-
- )}
- switchPage(entry.id)}
- compact>
- {entry.icon} {entry.title}
-
- {entry.divider && }
- >
- ))}
+ {pages.map((entry, i) =>
+ entry.hidden ? undefined : (
+ <>
+ {entry.category && (
+
+ )}
+ switchPage(entry.id)}
+ compact>
+ {entry.icon} {entry.title}
+
+ {entry.divider && }
+ >
+ ),
+ )}
{custom}
diff --git a/src/pages/settings/Settings.tsx b/src/pages/settings/Settings.tsx
index c5911dd4..01c6e500 100644
--- a/src/pages/settings/Settings.tsx
+++ b/src/pages/settings/Settings.tsx
@@ -104,6 +104,7 @@ export default function Settings() {
},
{
id: "native",
+ hidden: !window.isNative,
icon: ,
title: ,
},
@@ -140,11 +141,9 @@ export default function Settings() {
,
- window.isNative && (
-
-
-
- ),
+
+
+ ,
,