summaryrefslogtreecommitdiff
path: root/frontend/src/components/settings/pages/general/BranchSelect.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/settings/pages/general/BranchSelect.tsx')
-rw-r--r--frontend/src/components/settings/pages/general/BranchSelect.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/frontend/src/components/settings/pages/general/BranchSelect.tsx b/frontend/src/components/settings/pages/general/BranchSelect.tsx
index 91e814e5..d803f604 100644
--- a/frontend/src/components/settings/pages/general/BranchSelect.tsx
+++ b/frontend/src/components/settings/pages/general/BranchSelect.tsx
@@ -1,18 +1,21 @@
import { Dropdown, Field } from 'decky-frontend-lib';
import { FunctionComponent } from 'react';
+import { callUpdaterMethod } from '../../../../updater';
import { useSetting } from '../../../../utils/hooks/useSetting';
enum UpdateBranch {
Stable,
Prerelease,
- Nightly,
+ // Nightly,
}
const BranchSelect: FunctionComponent<{}> = () => {
const [selectedBranch, setSelectedBranch] = useSetting<UpdateBranch>('branch', UpdateBranch.Prerelease);
return (
+ // Returns numerical values from 0 to 2 (with current branch setup as of 8/28/22)
+ // 0 being stable, 1 being pre-release and 2 being nightly
<Field label="Update Channel">
<Dropdown
rgOptions={Object.values(UpdateBranch)
@@ -22,8 +25,10 @@ const BranchSelect: FunctionComponent<{}> = () => {
data: UpdateBranch[branch],
}))}
selectedOption={selectedBranch}
- onChange={(newVal) => {
- setSelectedBranch(newVal.data);
+ onChange={async (newVal) => {
+ await setSelectedBranch(newVal.data);
+ callUpdaterMethod('check_for_updates');
+ console.log('switching branches!');
}}
/>
</Field>