Skip to content

Commit

Permalink
When large content view is enabled, on long presses it will correctly…
Browse files Browse the repository at this point in the history
… switch to the last selected item

PiperOrigin-RevId: 323167120
  • Loading branch information
afweiss authored and material-automation committed Jul 25, 2020
1 parent d649859 commit 3481620
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions components/BottomNavigation/src/MDCBottomNavigationBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,15 @@ - (CGFloat)mdc_currentElevation {
- (void)largeContentViewerInteraction:(UILargeContentViewerInteraction *)interaction
didEndOnItem:(id<UILargeContentViewerItem>)item
atPoint:(CGPoint)point NS_AVAILABLE_IOS(13_0) {
if (item) {
for (NSUInteger i = 0; i < self.items.count; i++) {
MDCBottomNavigationItemView *itemView = self.itemViews[i];
if (item == itemView) {
[self didTouchUpInsideButton:itemView.button];
}
}
}

self.lastLargeContentViewerItem = nil;
}
#endif // MDC_AVAILABLE_SDK_IOS(13_0)
Expand Down

0 comments on commit 3481620

Please sign in to comment.