Merge pull request #5278 from urbit/hm/fix-app-ota-setting

app-prefs: fixing logic around enabled
This commit is contained in:
fang 2021-10-04 21:14:12 +02:00 committed by GitHub
commit 08a1730197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ export const AppPrefs = ({ match }: RouteComponentProps<{ desk: string }>) => {
const charge = useCharge(desk);
const vat = useVat(desk);
const tracking = !!vat?.arak.rail;
const otasEnabled = vat?.arak.rail?.paused;
const otasEnabled = !vat?.arak.rail?.paused;
const otaSource = vat?.arak.rail?.ship;
const toggleOTAs = useKilnState((s) => s.toggleOTAs);
@ -21,7 +21,7 @@ export const AppPrefs = ({ match }: RouteComponentProps<{ desk: string }>) => {
<h2 className="h3 mb-7">{charge?.title} Settings</h2>
<div className="space-y-3">
{tracking ? (
<Setting on={!!otasEnabled} toggle={toggleUpdates} name="Automatic Updates">
<Setting on={otasEnabled} toggle={toggleUpdates} name="Automatic Updates">
<p>Automatically download and apply updates to keep {charge?.title} up to date.</p>
{otaSource && (
<p>