Replace the native confirm and alert with an in-app dialog. [skip build]
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user