AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix(android): open GitHub update links
tianma-ifa2d1993bee23
diff --git a/apps/mobile/src/lib/mobile-update-destination.test.ts b/apps/mobile/src/lib/mobile-update-destination.test.tsindex 2a2e229f..2e1fdd94 100644--- a/apps/mobile/src/lib/mobile-update-destination.test.ts+++ b/apps/mobile/src/lib/mobile-update-destination.test.ts@@ -14,13 +14,15 @@ test("opens the app listing directly in Google Play without invoking a generic Uconst openedUrls: string[] = [];const result = await openMobileInstallUpdateSource(googlePlay, {+ linking: {+ openURL: async (url) => {+ openedUrls.push(url);+ },+ },openGooglePlayDetails: (applicationId) => {openedApplicationIds.push(applicationId);return "opened";},- openUrl: async (url) => {- openedUrls.push(url);- },});expect(openedApplicationIds).toEqual(["org.edgeever.mobile"]);@@ -32,10 +34,12 @@ test("reports that Google Play is not installed without opening a browser automaconst openedUrls: string[] = [];const result = await openMobileInstallUpdateSource(googlePlay, {- openGooglePlayDetails: () => "not-installed",- openUrl: async (url) => {- openedUrls.push(url);+ linking: {+ openURL: async (url) => {+ openedUrls.push(url);+ },},+ openGooglePlayDetails: () => "not-installed",});expect(result).toEqual({@@ -47,8 +51,8 @@ test("reports that Google Play is not installed without opening a browser automatest("preserves the disabled Google Play reason", async () => {const result = await openMobileInstallUpdateSource(googlePlay, {+ linking: { openURL: async () => undefined },openGooglePlayDetails: () => "disabled",- openUrl: async () => undefined,});expect(result).toEqual({@@ -62,12 +66,14 @@ test("reports Google Play as unavailable when the native launch fails unexpectedconst openedUrls: string[] = [];const result = await openMobileInstallUpdateSource(googlePlay, {+ linking: {+ openURL: async (url) => {+ openedUrls.push(url);+ },+ },openGooglePlayDetails: () => {throw new Error("native module unavailable");},- openUrl: async (url) => {- openedUrls.push(url);- },});expect(result).toEqual({@@ -80,14 +86,18 @@ test("reports Google Play as unavailable when the native launch fails unexpectedtest("opens GitHub through the regular URL handler", async () => {const openedUrls: string[] = [];+ const linking = {+ async openURL(url: string) {+ expect(this).toBe(linking);+ openedUrls.push(url);+ },+ };const result = await openMobileInstallUpdateSource(github, {+ linking,openGooglePlayDetails: () => {throw new Error("Google Play should not be called");},- openUrl: async (url) => {- openedUrls.push(url);- },});expect(openedUrls).toEqual([github.url]);diff --git a/apps/mobile/src/lib/mobile-update-destination.ts b/apps/mobile/src/lib/mobile-update-destination.tsindex 80261e01..baa130ab 100644--- a/apps/mobile/src/lib/mobile-update-destination.ts+++ b/apps/mobile/src/lib/mobile-update-destination.ts@@ -2,8 +2,10 @@ import type { MobileInstallUpdateSource } from "./mobile-release";import type { GooglePlayOpenResult } from "../../modules/edgeever-app-store";type MobileUpdateDestinationDependencies = {+ linking: {+ openURL: (url: string) => Promise<unknown>;+ };openGooglePlayDetails: (applicationId: string) => GooglePlayOpenResult | Promise<GooglePlayOpenResult>;- openUrl: (url: string) => Promise<unknown>;};type GooglePlayOpenFailure = Exclude<GooglePlayOpenResult, "opened">;@@ -47,6 +49,6 @@ export const openMobileInstallUpdateSource = async (};}- await dependencies.openUrl(source.url);+ await dependencies.linking.openURL(source.url);return { status: "opened" };};diff --git a/apps/mobile/src/lib/mobile-update.tsx b/apps/mobile/src/lib/mobile-update.tsxindex d1e5711d..9e9d239c 100644--- a/apps/mobile/src/lib/mobile-update.tsx+++ b/apps/mobile/src/lib/mobile-update.tsx@@ -59,8 +59,8 @@ export const MobileUpdateProvider = ({ children }: { children: ReactNode }) => {const openManualUpdateSource = useCallback((source: MobileInstallUpdateSource) => {void openMobileInstallUpdateSource(source, {+ linking: Linking,openGooglePlayDetails,- openUrl: Linking.openURL,}).then((result) => {if (result.status !== "google-play-unavailable") {return;