diff --git a/Classes/HistoryListTableView.m b/Classes/HistoryListTableView.m index e26b3efe9..70583ebf6 100644 --- a/Classes/HistoryListTableView.m +++ b/Classes/HistoryListTableView.m @@ -221,12 +221,18 @@ id log = [_sections objectForKey:_sortedDays[indexPath.section]][indexPath.row]; LinphoneCallLog *callLog = [log pointerValue]; if (callLog != NULL && linphone_call_log_get_call_id(callLog) != NULL) { - LinphoneAddress *addr = linphone_call_log_get_remote_address(callLog); - char *uri = linphone_address_as_string(addr); - DialerView *view = VIEW(DialerView); - [PhoneMainView.instance changeCurrentView:view.compositeViewDescription]; - [view call:[NSString stringWithUTF8String:uri] displayName:[FastAddressBook displayNameForAddress:addr]]; - ms_free(uri); + if (LinphoneManager.runningOnIpad) { + UIHistoryCell *cell = (UIHistoryCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath]; + [cell onDetails:self]; + } else { + LinphoneAddress *addr = linphone_call_log_get_remote_address(callLog); + char *uri = linphone_address_as_string(addr); + DialerView *view = VIEW(DialerView); + [PhoneMainView.instance changeCurrentView:view.compositeViewDescription]; + [view call:[NSString stringWithUTF8String:uri] + displayName:[FastAddressBook displayNameForAddress:addr]]; + ms_free(uri); + } } } } diff --git a/Classes/LinphoneUI/UICompositeView.m b/Classes/LinphoneUI/UICompositeView.m index 577ece25c..7aacb6fe5 100644 --- a/Classes/LinphoneUI/UICompositeView.m +++ b/Classes/LinphoneUI/UICompositeView.m @@ -64,8 +64,8 @@ self.fullscreen = fullscreen; self.landscapeMode = YES; self.portraitMode = YES; - self.isLeftFragment = isLeftFragment || (otherFragment == nil); self.otherFragment = LinphoneManager.runningOnIpad ? NSStringFromClass(otherFragment) : nil; + self.isLeftFragment = isLeftFragment || (self.otherFragment == nil); self.darkBackground = true; return self; @@ -406,9 +406,9 @@ UIViewController *newMainViewController = description.isLeftFragment ? [self getCachedController:description.name] : [self getCachedController:description.otherFragment]; - UIViewController *newDetailsViewController = description.isLeftFragment - ? [self getCachedController:description.otherFragment] - : [self getCachedController:description.name]; + UIViewController *newDetailsViewController = !description.isLeftFragment + ? [self getCachedController:description.name] + : [self getCachedController:description.otherFragment]; UIViewController *newStatusBarViewController = [self getCachedController:description.statusBar]; UIViewController *newTabBarViewController = [self getCachedController:description.tabBar]; UIViewController *newSideMenuViewController = [self getCachedController:description.sideMenu]; diff --git a/Classes/LinphoneUI/UIHistoryCell.m b/Classes/LinphoneUI/UIHistoryCell.m index 3978ebabc..003e4799c 100644 --- a/Classes/LinphoneUI/UIHistoryCell.m +++ b/Classes/LinphoneUI/UIHistoryCell.m @@ -39,6 +39,7 @@ UIView *sub = ((UIView *)[arrayOfViews objectAtIndex:0]); [self setFrame:CGRectMake(0, 0, sub.frame.size.width, sub.frame.size.height)]; [self addSubview:sub]; + _detailsButton.hidden = LinphoneManager.runningOnIpad; callLog = NULL; } return self;