MOBILE-4059 core: Fix support help for guests
This commit is contained in:
		
							parent
							
								
									6ff5868e9d
								
							
						
					
					
						commit
						ad86d6e6e0
					
				| @ -138,6 +138,7 @@ export class CoreLoginCredentialsPage implements OnInit, OnDestroy { | ||||
|         CoreUserSupport.showHelp( | ||||
|             Translate.instant('core.login.credentialshelp'), | ||||
|             Translate.instant('core.login.credentialssupportsubject'), | ||||
|             this.supportConfig, | ||||
|         ); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -149,6 +149,7 @@ export class CoreLoginReconnectPage implements OnInit, OnDestroy { | ||||
|         CoreUserSupport.showHelp( | ||||
|             Translate.instant('core.login.reconnecthelp'), | ||||
|             Translate.instant('core.login.reconnectsupportsubject'), | ||||
|             this.supportConfig, | ||||
|         ); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -25,6 +25,7 @@ import { CoreSubscriptions } from '@singletons/subscriptions'; | ||||
| import { AlertButton } from '@ionic/angular'; | ||||
| import { CoreDomUtils } from '@services/utils/dom'; | ||||
| import { CoreLang } from '@services/lang'; | ||||
| import { CoreUserNullSupportConfig } from '@features/user/classes/support/null-support-config'; | ||||
| 
 | ||||
| /** | ||||
|  * Handle site support. | ||||
| @ -57,10 +58,15 @@ export class CoreUserSupportService { | ||||
|      * @param message Help message. | ||||
|      * @param supportSubject Support subject. | ||||
|      */ | ||||
|     showHelp(message: string, supportSubject: string): void { | ||||
|         const supportConfig = CoreUserAuthenticatedSupportConfig.forCurrentSite(); | ||||
|     showHelp(message: string, supportSubject: string, supportConfig?: CoreUserSupportConfig): void { | ||||
|         const buttons: (AlertButton | string)[] = []; | ||||
| 
 | ||||
|         if (!supportConfig) { | ||||
|             const site = CoreSites.getCurrentSite(); | ||||
| 
 | ||||
|             supportConfig = site ? new CoreUserAuthenticatedSupportConfig(site) : new CoreUserNullSupportConfig(); | ||||
|         } | ||||
| 
 | ||||
|         if (supportConfig.canContactSupport()) { | ||||
|             buttons.push({ | ||||
|                 text: Translate.instant('core.contactsupport'), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user