Chat screen: Hide sub menu if user tap on table view

This commit is contained in:
giomfo
2015-09-08 17:53:53 +02:00
parent b816495ba2
commit 9076672ea2
@@ -259,6 +259,12 @@
- (void)dataSource:(MXKDataSource *)dataSource didRecognizeAction:(NSString *)actionIdentifier inCell:(id<MXKCellRendering>)cell userInfo:(NSDictionary *)userInfo
{
// Remove sub menu if user tap on table view
if (menuListTopConstraint.constant != 0)
{
[self onButtonPressed:self.navigationItem.rightBarButtonItem];
}
if ([actionIdentifier isEqualToString:kMXKRoomBubbleCellTapOnMessageTextView])
{
self.roomDataSource.showBubblesDateTime = !self.roomDataSource.showBubblesDateTime;
@@ -391,6 +397,19 @@
}
}
#pragma mark - UITableView delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// Remove sub menu if user tap on table view
if (menuListTopConstraint.constant != 0)
{
[self onButtonPressed:self.navigationItem.rightBarButtonItem];
}
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
}
@end