mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-24 14:31:16 +00:00
make mobileAppSwitch generic
This commit is contained in:
@@ -169,14 +169,19 @@ export class AppService implements OnDestroy {
|
||||
|
||||
this.overlayContainer.getContainerElement().setAttribute('role', 'region');
|
||||
|
||||
const isMobileSwitchEnabled = this.config.get<string>('mobileAppSwitch.enabled', 'false') === 'true';
|
||||
if (isMobileSwitchEnabled) {
|
||||
const isEnabled = this.isMobileSwitchEnabled();
|
||||
if (isEnabled) {
|
||||
this.acaMobileAppSwitcherService.resolveExistenceOfDialog();
|
||||
} else {
|
||||
this.acaMobileAppSwitcherService.clearSessionExpireTime();
|
||||
}
|
||||
}
|
||||
|
||||
private isMobileSwitchEnabled(): boolean {
|
||||
const flag = this.config.get<boolean | string>('mobileAppSwitch.enabled');
|
||||
return flag === true || flag === 'true';
|
||||
}
|
||||
|
||||
private loadRepositoryStatus() {
|
||||
this.contentApi.getRepositoryInformation().subscribe((response: DiscoveryEntry) => {
|
||||
if (response?.entry?.repository) {
|
||||
|
Reference in New Issue
Block a user