Skip to content

Commit

Permalink
#1328 - fix for secondary dashboard getting selected on menu select
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels committed May 7, 2024
1 parent ec23e12 commit 8e88aa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/openchs-android/src/action/LandingViewActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class LandingViewActions {
return {
...newState,
home: true,
secondaryDashboardSelected: false
}
}

Expand All @@ -62,6 +63,7 @@ class LandingViewActions {
return {
...newState,
search: true,
secondaryDashboardSelected: false
}
}

Expand All @@ -78,6 +80,7 @@ class LandingViewActions {
return {
...newState,
register: true,
secondaryDashboardSelected: false
}
}

Expand All @@ -86,6 +89,7 @@ class LandingViewActions {
return {
...newState,
menu: true,
secondaryDashboardSelected: false
}
}

Expand Down
5 changes: 3 additions & 2 deletions packages/openchs-android/src/views/LandingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ class LandingView extends AbstractComponent {
registerMenuItem,
searchMenuItem
];
if (!_.isNil(secondaryDashboard))
if (!_.isNil(secondaryDashboard)) {
bottomBarIcons.push([this.Icon("dashboard", LandingView.barIconStyle, secondaryDashboardSelected, false, "MaterialIcons"),
_.truncate(this.I18n.t(secondaryDashboard.name), {'length': 14}), () => this.dispatchAction(Actions.ON_SECONDARY_DASHBOARD_CLICK), menu]);
_.truncate(this.I18n.t(secondaryDashboard.name), {'length': 14}), () => this.dispatchAction(Actions.ON_SECONDARY_DASHBOARD_CLICK), secondaryDashboardSelected]);
}
bottomBarIcons.push(moreMenu);

return (
Expand Down

0 comments on commit 8e88aa5

Please sign in to comment.