MOBILE-3153 usertours: Disable from config
parent
bd37ed4345
commit
0a24df0f28
|
@ -12,6 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { CoreConstants } from '@/core/constants';
|
||||
import { asyncInstance } from '@/core/utils/async-instance';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CoreDatabaseTable } from '@classes/database/database-table';
|
||||
|
@ -60,6 +61,10 @@ export class CoreUserToursService {
|
|||
* @returns Whether the User Tour is pending or not.
|
||||
*/
|
||||
async isPending(id: string): Promise<boolean> {
|
||||
if (CoreConstants.CONFIG.disableUserTours || CoreConstants.CONFIG.disabledUserTours?.includes(id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const isAcknowledged = await this.table.hasAnyByPrimaryKey({ id });
|
||||
|
||||
return !isAcknowledged;
|
||||
|
|
|
@ -34,6 +34,8 @@ export interface EnvironmentConfig {
|
|||
languages: Record<string, string>;
|
||||
databaseOptimizations?: Partial<CoreDatabaseConfiguration>;
|
||||
databaseTableOptimizations?: Record<string, Partial<CoreDatabaseConfiguration>>;
|
||||
disableUserTours?: boolean;
|
||||
disabledUserTours?: string[];
|
||||
wsservice: string;
|
||||
demo_sites: Record<string, CoreSitesDemoSiteData>;
|
||||
zoomlevels: Record<CoreZoomLevel, number>;
|
||||
|
|
Loading…
Reference in New Issue