Skip to content

Commit 07aefa6

Browse files
committed
Fix update-check ordering and remove unused NewConnectionRouteScreen
- Swap isDevelopment/!isPackaged guard before hasUpdateFeedConfig in getAutoUpdateDisabledReason so dev builds get the specific 'packaged production builds' message instead of the generic 'no update feed' one. - Update test to use hasUpdateFeedConfig: false for the dev-build case, reflecting real-world conditions. - Delete unused NewConnectionRouteScreen.tsx which duplicated the actual route screen at app/connections/new.tsx.
1 parent fbcf04a commit 07aefa6

File tree

3 files changed

+4
-257
lines changed

3 files changed

+4
-257
lines changed

apps/desktop/src/updateState.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ describe("getAutoUpdateDisabledReason", () => {
7171
platform: "darwin",
7272
appImage: undefined,
7373
disabledByEnv: false,
74-
hasUpdateFeedConfig: true,
74+
hasUpdateFeedConfig: false,
7575
}),
7676
).toContain("packaged production builds");
7777
});

apps/desktop/src/updateState.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ export function getAutoUpdateDisabledReason(args: {
3636
disabledByEnv: boolean;
3737
hasUpdateFeedConfig: boolean;
3838
}): string | null {
39-
if (!args.hasUpdateFeedConfig) {
40-
return "Automatic updates are not available because no update feed is configured.";
41-
}
4239
if (args.isDevelopment || !args.isPackaged) {
4340
return "Automatic updates are only available in packaged production builds.";
4441
}
42+
if (!args.hasUpdateFeedConfig) {
43+
return "Automatic updates are not available because no update feed is configured.";
44+
}
4545
if (args.disabledByEnv) {
4646
return "Automatic updates are disabled by the T3CODE_DISABLE_AUTO_UPDATE setting.";
4747
}

apps/mobile/src/features/connection/NewConnectionRouteScreen.tsx

Lines changed: 0 additions & 253 deletions
This file was deleted.

0 commit comments

Comments
 (0)