Merge branch 'bugfix/right_panel_button_fix' into 'develop'
Bug: rightPanelButton and fixed space is getting added multiple times, if... See merge request BPHV_MIPS/mvm_core_ui!480
This commit is contained in:
commit
a5d59db903
@ -240,7 +240,7 @@ CGFloat const PanelAnimationDuration = 0.2;
|
|||||||
if (extraButtons) {
|
if (extraButtons) {
|
||||||
[leftBarButtonItems addObjectsFromArray:extraButtons];
|
[leftBarButtonItems addObjectsFromArray:extraButtons];
|
||||||
}
|
}
|
||||||
if ((accessible && !extended) && self.leftPanelButton) {
|
if ((accessible && !extended) && self.leftPanelButton && ![extraButtons containsObject:self.leftPanelButton]) {
|
||||||
[leftBarButtonItems addObject:self.leftPanelButton];
|
[leftBarButtonItems addObject:self.leftPanelButton];
|
||||||
}
|
}
|
||||||
[viewController.navigationItem setLeftBarButtonItems:(leftBarButtonItems.count > 0 ? leftBarButtonItems : nil) animated:!DisableAnimations];
|
[viewController.navigationItem setLeftBarButtonItems:(leftBarButtonItems.count > 0 ? leftBarButtonItems : nil) animated:!DisableAnimations];
|
||||||
@ -407,10 +407,10 @@ CGFloat const PanelAnimationDuration = 0.2;
|
|||||||
|
|
||||||
- (void)setRightNavigationItemForViewController:(UIViewController * _Nonnull)viewController accessible:(BOOL)accessible extended:(BOOL)extended {
|
- (void)setRightNavigationItemForViewController:(UIViewController * _Nonnull)viewController accessible:(BOOL)accessible extended:(BOOL)extended {
|
||||||
NSMutableArray *navigationItems = [[NSMutableArray alloc] init];
|
NSMutableArray *navigationItems = [[NSMutableArray alloc] init];
|
||||||
if ((accessible && !extended) && self.rightPanelButton) {
|
NSArray *extraButtons = [self additionalRightButtonsForViewController:viewController];
|
||||||
|
if ((accessible && !extended) && self.rightPanelButton && ![extraButtons containsObject:self.rightPanelButton]) {
|
||||||
[navigationItems addObject:self.rightPanelButton];
|
[navigationItems addObject:self.rightPanelButton];
|
||||||
}
|
}
|
||||||
NSArray *extraButtons = [self additionalRightButtonsForViewController:viewController];
|
|
||||||
if (extraButtons) {
|
if (extraButtons) {
|
||||||
[navigationItems addObjectsFromArray:extraButtons];
|
[navigationItems addObjectsFromArray:extraButtons];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user