From 08bb7933aa7f05e489b4a8bee7e27f1baf6b63df Mon Sep 17 00:00:00 2001 From: na Date: Fri, 28 Apr 2023 12:13:29 +0700 Subject: [PATCH] [MM-51284] - Correctly check for mobile view in product menu list (#23025) * [MM-51284] - Correctly check for mobile view in product menu list * fix lint --------- Co-authored-by: Nevyana Angelova Co-authored-by: Mattermost Build --- .../left_controls/product_menu/product_menu_list/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/channels/src/components/global_header/left_controls/product_menu/product_menu_list/index.ts b/webapp/channels/src/components/global_header/left_controls/product_menu/product_menu_list/index.ts index 023e5f29b8..d6b2389b0b 100644 --- a/webapp/channels/src/components/global_header/left_controls/product_menu/product_menu_list/index.ts +++ b/webapp/channels/src/components/global_header/left_controls/product_menu/product_menu_list/index.ts @@ -29,6 +29,7 @@ import {CloudProducts} from 'utils/constants'; import {isCloudLicense} from 'utils/license_utils'; import ProductMenuList from './product_menu_list'; +import {getIsMobileView} from 'selectors/views/browser'; type Actions = { openModal:

(modalData: ModalData

) => void; @@ -53,6 +54,7 @@ function mapStateToProps(state: GlobalState) { const step = getInt(state, OnboardingTaskCategory, OnboardingTasksName.VISIT_SYSTEM_CONSOLE, 0); const showVisitSystemConsoleTour = step === TaskNameMapToSteps[OnboardingTasksName.VISIT_SYSTEM_CONSOLE].STARTED; const enableCustomUserGroups = isCustomGroupsEnabled(state); + const isMobile = getIsMobileView(state); const subscription = getCloudSubscription(state); const license = getLicense(state); @@ -70,7 +72,7 @@ function mapStateToProps(state: GlobalState) { const isFreeTrial = isCloudFreeTrial || isSelfHostedFreeTrial; return { - isMobile: state.views.channel.mobileView, + isMobile, appDownloadLink, enableCommands, canManageIntegrations,