Skip to content

Commit c6f73af

Browse files
committed
MOBILE-4616 reportbuilder: Only show report builder on user menu
1 parent cfff5e6 commit c6f73af

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/core/features/reportbuilder/services/handlers/reportbuilder.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
CoreUserProfileHandlerType,
1818
CoreUserProfileHandler,
1919
CoreUserProfileHandlerData,
20+
CoreUserDelegateContext,
2021
} from '@features/user/services/user-delegate';
2122
import { CoreNavigator } from '@services/navigator';
2223
import { makeSingleton } from '@singletons';
@@ -42,6 +43,18 @@ export class CoreReportBuilderHandlerService implements CoreUserProfileHandler {
4243
return await CoreReportBuilder.isEnabled();
4344
}
4445

46+
/**
47+
* @inheritdoc
48+
*/
49+
async isEnabledForContext(context: CoreUserDelegateContext): Promise<boolean> {
50+
// Custom reports only available in user menu.
51+
if (context !== CoreUserDelegateContext.USER_MENU) {
52+
return false;
53+
}
54+
55+
return this.isEnabled();
56+
}
57+
4558
/**
4659
* @inheritdoc
4760
*/

0 commit comments

Comments
 (0)