Merge pull request #3414 from dpalou/MOBILE-4081
MOBILE-4081 core: Only show warning if http
This commit is contained in:
		
						commit
						153c8a6d02
					
				@ -55,6 +55,11 @@ export class CoreWindow {
 | 
				
			|||||||
     * @return Promise resolved if confirmed, rejected if rejected.
 | 
					     * @return Promise resolved if confirmed, rejected if rejected.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    static async confirmOpenBrowserIfNeeded(url: string): Promise<void> {
 | 
					    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.
 | 
					        // Check if the user decided not to see the warning.
 | 
				
			||||||
        const dontShowWarning = await CoreConfig.get(CoreConstants.SETTINGS_DONT_SHOW_EXTERNAL_LINK_WARN, 0);
 | 
					        const dontShowWarning = await CoreConfig.get(CoreConstants.SETTINGS_DONT_SHOW_EXTERNAL_LINK_WARN, 0);
 | 
				
			||||||
        if (dontShowWarning) {
 | 
					        if (dontShowWarning) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user