Replace the native confirm and alert with an in-app dialog. [skip build]
Checks / checks (push) Successful in 2m8s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-01 11:44:17 +11:00
parent 6805762834
commit 9bc8679fb7
6 changed files with 88 additions and 17 deletions
+3 -5
View File
@@ -1,5 +1,6 @@
import type { PluginListenerHandle } from '@capacitor/core';
import type { IPusherRequest, MatrixClient } from 'matrix-js-sdk';
import { promptDialog } from '../state/dialog';
const CAPACITOR_CORE_MODULE_ID = '@capacitor/core';
@@ -366,14 +367,11 @@ class AndroidUnifiedPushManager {
if (typeof window === 'undefined') return;
try {
const openDocs = window.confirm(`${message}\n\nOpen distributor list now?`);
promptDialog(`${message}\n\nOpen distributor list now?`, true).then((openDocs) => {
if (openDocs) {
window.open(docsUrl, '_blank', 'noopener,noreferrer');
}
} catch {
window.alert(message);
}
});
}
/** Install plugin listeners once for the active Matrix client. */