forked from mirrors/linphone-iphone
inpause
This commit is contained in:
parent
d3ed4277e0
commit
a64137cf9d
3 changed files with 16 additions and 8 deletions
|
|
@ -116,7 +116,7 @@
|
|||
</accessibility>
|
||||
</view>
|
||||
<view contentMode="scaleAspectFit" id="127" userLabel="preview">
|
||||
<rect key="frame" x="253.99998625559141" y="355.00002002077525" width="113" height="140"/>
|
||||
<rect key="frame" x="254" y="355" width="113" height="140"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
|
|
@ -156,8 +156,8 @@
|
|||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="106" userLabel="pausedCallsTableView">
|
||||
<rect key="frame" x="0.0" y="393" width="375" height="110"/>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" allowsSelection="NO" rowHeight="50" sectionHeaderHeight="1" sectionFooterHeight="1" id="106" userLabel="pausedCallsTableView">
|
||||
<rect key="frame" x="0.0" y="453" width="375" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<inset key="contentInset" minX="0.0" minY="10" maxX="0.0" maxY="25"/>
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@
|
|||
|
||||
- (void)update {
|
||||
[self.tableView reloadData];
|
||||
|
||||
CGRect newOrigin = self.tableView.frame;
|
||||
newOrigin.size.height =
|
||||
[self tableView:self.tableView heightForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
|
||||
[self tableView:self.tableView heightForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]] *
|
||||
[self tableView:self.tableView numberOfRowsInSection:0];
|
||||
newOrigin.origin.y = self.tableView.frame.origin.y + self.tableView.frame.size.height - newOrigin.size.height;
|
||||
self.tableView.frame = newOrigin;
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
#pragma mark - UITableViewDataSource Functions
|
||||
- (LinphoneCall *)pausedCallForRow:(NSInteger)row {
|
||||
const MSList *calls = linphone_core_get_calls([LinphoneManager getLc]);
|
||||
return (row < ms_list_size(calls) /* - 1*/) ? ms_list_nth_data(calls, (int)row) : NULL;
|
||||
return (row < ms_list_size(calls) - 1) ? ms_list_nth_data(calls, (int)row) : NULL;
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource Functions
|
||||
|
|
@ -67,12 +67,12 @@
|
|||
if (cell == nil) {
|
||||
cell = [[UICallPausedCell alloc] initWithIdentifier:kCellId];
|
||||
}
|
||||
cell.call = [self pausedCallForRow:indexPath.row];
|
||||
[cell setCall:[self pausedCallForRow:indexPath.row]];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return ms_list_size(linphone_core_get_calls([LinphoneManager getLc])) /* - 1*/;
|
||||
return ms_list_size(linphone_core_get_calls([LinphoneManager getLc])) - 1;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
|
|
@ -83,4 +83,11 @@
|
|||
return [self tableView:tableView cellForRowAtIndexPath:indexPath].frame.size.height;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
|
||||
return 1e-5;
|
||||
}
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
return 1e-5;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
const LinphoneAddress *addr = linphone_call_get_remote_address(call);
|
||||
[ContactDisplay setDisplayNameLabel:_nameLabel forAddress:addr];
|
||||
|
||||
_avatarImage.image =
|
||||
[FastAddressBook getContactImage:[FastAddressBook getContactWithLinphoneAddress:addr] thumbnail:NO];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue