History: fix sections order and other UI bugs

This commit is contained in:
Gautier Pelloux-Prayer 2015-10-26 17:08:50 +01:00
parent 5b47846d76
commit 7fd9ca22c5
10 changed files with 24 additions and 17 deletions

View file

@ -146,7 +146,7 @@
</tableView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No history." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xtr-Fp-60Z" userLabel="emptyTableLabel">
<rect key="frame" x="0.0" y="40" width="375" height="519"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>

View file

@ -426,7 +426,8 @@ static void message_status(LinphoneChatMessage *msg, LinphoneChatMessageState st
- (IBAction)onBackClick:(id)event {
[_tableController setChatRoom:NULL];
[PhoneMainView.instance popCurrentView];
ChatsListView *view = VIEW(ChatsListView);
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
}
- (IBAction)onEditClick:(id)event {

View file

@ -243,7 +243,9 @@ static UICompositeViewDescription *compositeDescription = nil;
if ([ContactSelection getSelectionMode] == ContactSelectionModeEdit) {
[ContactSelection setSelectionMode:ContactSelectionModeNone];
}
[PhoneMainView.instance popCurrentView];
ContactsListView *view = VIEW(ContactsListView);
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
}
- (IBAction)onEditClick:(id)event {

View file

@ -149,7 +149,8 @@ static UICompositeViewDescription *compositeDescription = nil;
#pragma mark - Action Functions
- (IBAction)onBackClick:(id)event {
[PhoneMainView.instance popCurrentView];
HistoryListView *view = VIEW(HistoryListView);
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
}
- (IBAction)onContactClick:(id)event {

View file

@ -130,8 +130,8 @@
- (void)computeSections {
NSArray *unsortedDays = [self.sections allKeys];
self.sortedDays = [unsortedDays sortedArrayUsingComparator:^NSComparisonResult(NSDate *d1, NSDate *d2) {
return ![d1 compare:d2]; // reverse order
_sortedDays = [unsortedDays sortedArrayUsingComparator:^NSComparisonResult(NSDate *d1, NSDate *d2) {
return [d2 compare:d1]; // reverse order
}];
}

View file

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" launchScreen="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" launchScreen="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_C.png" id="xtr-QP-6We" userLabel="backgroundColor">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
@ -36,12 +36,17 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="238.5" y="1005.5"/>
</view>
</objects>
<resources>
<image name="color_C.png" width="1" height="1"/>
<image name="color_C.png" width="2" height="2"/>
<image name="splashscreen.png" width="181" height="165"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -344,11 +344,13 @@
[PhoneMainView.instance changeCurrentView:ChatsListView.compositeViewDescription];
LinphoneChatRoom *room = [self findChatRoomForContact:remoteContact];
ChatConversationView *view = VIEW(ChatConversationView);
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription push:TRUE], [view setChatRoom:room];
[view setChatRoom:room];
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription push:TRUE];
} else if ([notification.userInfo objectForKey:@"callLog"] != nil) {
NSString *callLog = (NSString *)[notification.userInfo objectForKey:@"callLog"];
HistoryDetailsView *view = VIEW(HistoryDetailsView);
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription push:TRUE], [view setCallLogId:callLog];
[view setCallLogId:callLog];
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription push:TRUE];
}
}

View file

@ -71,5 +71,4 @@ stun=stun.linphone.org
[misc]
history_max_size=30
max_calls=3

View file

@ -9,8 +9,6 @@ dtmf_player_amp=0.007
eq_location=mic
eq_gains=50:2:50 100:2:50
[video]
display_filter_auto_rotate=0

View file

@ -71,5 +71,4 @@ stun=stun.linphone.org
[misc]
history_max_size=30
max_calls=3