Bug Fix - Repeatedly tapping on tab jumps through rooms in wrong order

#1306
This commit is contained in:
Giom Foret
2017-06-16 16:55:54 +02:00
parent 85180f873e
commit a262de0b40
9 changed files with 131 additions and 55 deletions
+14 -2
View File
@@ -725,10 +725,22 @@
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
{
if (item.tag == TABBAR_ROOMS_INDEX && self.selectedIndex == TABBAR_ROOMS_INDEX)
// Detect multi-tap on the current selected tab.
if (item.tag == self.selectedIndex)
{
// Scroll to the next room with missed notifications.
[self.roomsViewController scrollToNextRoomWithMissedNotifications];
if (item.tag == TABBAR_ROOMS_INDEX)
{
[self.roomsViewController scrollToNextRoomWithMissedNotifications];
}
else if (item.tag == TABBAR_PEOPLE_INDEX)
{
[self.peopleViewController scrollToNextRoomWithMissedNotifications];
}
else if (item.tag == TABBAR_FAVOURITES_INDEX)
{
[self.favouritesViewController scrollToNextRoomWithMissedNotifications];
}
}
}