Details
-
Improvement
-
Resolution: Obsolete
-
Neutral
-
None
-
5.0
-
None
-
None
Description
BrowserPresenter contains some functions that are identical or similar to those in BrowserSubApp.
The methods were created in BrowserPresenter because that seems to be the proper location and the ActionBar methods will probably move to that file as well.
isSectionVisible is duplicated.
getVisibleSection is duplicated.
showActionPopup is very similar to BrowserSubApp.updateActionBar
A solution would be to create a method (bad name) ±prepareConfiguredActionBarDefinitionForItem(item,...) which would get the currently selected items and would create a new bean of only the sections, groups, items that apply to this item - and also with enabled flags properly set according to the action availability rules.
Then, both the actionbar and the actionpopup could use this method to determine what to display - but then each could use the configuredDefintion in their own way.