MOBILE-4616 reportbuilder: Only show report builder on user menu
parent
cfff5e6217
commit
c6f73af200
|
@ -17,6 +17,7 @@ import {
|
|||
CoreUserProfileHandlerType,
|
||||
CoreUserProfileHandler,
|
||||
CoreUserProfileHandlerData,
|
||||
CoreUserDelegateContext,
|
||||
} from '@features/user/services/user-delegate';
|
||||
import { CoreNavigator } from '@services/navigator';
|
||||
import { makeSingleton } from '@singletons';
|
||||
|
@ -42,6 +43,18 @@ export class CoreReportBuilderHandlerService implements CoreUserProfileHandler {
|
|||
return await CoreReportBuilder.isEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabledForContext(context: CoreUserDelegateContext): Promise<boolean> {
|
||||
// Custom reports only available in user menu.
|
||||
if (context !== CoreUserDelegateContext.USER_MENU) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.isEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue