MOBILE-4081 core: Only show warning if http

main
Dani Palou 2022-10-24 09:51:24 +02:00
parent 609c33d174
commit 8ce353832e
1 changed files with 5 additions and 0 deletions

View File

@ -55,6 +55,11 @@ export class CoreWindow {
* @return Promise resolved if confirmed, rejected if rejected.
*/
static async confirmOpenBrowserIfNeeded(url: string): Promise<void> {
if (!CoreUrlUtils.isHttpURL(url)) {
// Only ask confirm for http(s), other cases usually launch external apps.
return;
}
// Check if the user decided not to see the warning.
const dontShowWarning = await CoreConfig.get(CoreConstants.SETTINGS_DONT_SHOW_EXTERNAL_LINK_WARN, 0);
if (dontShowWarning) {