forked from mirrors/linphone-iphone
Rebase Release 5.1
This commit is contained in:
parent
8d12a8af89
commit
66b1a5a85f
6 changed files with 221 additions and 3 deletions
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
<outlet property="addGroupChatButton" destination="glf-ni-nqe" id="0hy-5m-7C7"/>
|
||||
<outlet property="backToCallButton" destination="Fac-hy-za4" id="8I3-TM-oJ7"/>
|
||||
<outlet property="cancelForwardButton" destination="Kxx-SO-CB0" id="LFJ-NQ-YrU"/>
|
||||
<outlet property="chatRoomSwiftButton" destination="EQ8-W6-ITN" id="apP-Tp-Veb"/>
|
||||
<outlet property="forwardTitle" destination="waa-HU-xFW" id="Qqs-p4-k9A"/>
|
||||
<outlet property="tableController" destination="4" id="18"/>
|
||||
<outlet property="toggleSelectionButton" destination="uqG-2T-VOa" id="cAk-tz-5Z0"/>
|
||||
|
|
@ -64,6 +65,21 @@
|
|||
<action selector="onAddGroupChatClick:" destination="-1" eventType="touchUpInside" id="tem-mm-w62"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EQ8-W6-ITN" userLabel="chatRoomSwiftButton" customClass="UIInterfaceStyleButton">
|
||||
<rect key="frame" x="165" y="0.0" width="83" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="New discussion"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="menu_resend_default.png">
|
||||
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<state key="disabled" image="chat_add_group.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onChatRoomSwiftClick:" destination="-1" eventType="touchUpInside" id="RyK-9X-ZrB"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KhE-c3-2Zj" userLabel="cancelButton" customClass="UIInterfaceStyleButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="82" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
|
|
@ -210,6 +226,7 @@
|
|||
<outlet property="toggleSelectionButton" destination="uqG-2T-VOa" id="ytx-bj-7Qr"/>
|
||||
<outlet property="view" destination="6" id="13"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="460" y="-11"/>
|
||||
</tableViewController>
|
||||
</objects>
|
||||
<resources>
|
||||
|
|
@ -217,13 +234,14 @@
|
|||
<image name="call_back_disabled.png" width="61.599998474121094" height="44"/>
|
||||
<image name="cancel_edit_default.png" width="47.200000762939453" height="47.200000762939453"/>
|
||||
<image name="cancel_edit_disabled.png" width="47.200000762939453" height="47.200000762939453"/>
|
||||
<image name="cancel_forward.png" width="80" height="80"/>
|
||||
<image name="cancel_forward.png" width="29" height="29"/>
|
||||
<image name="chat_add_default.png" width="50.400001525878906" height="44.799999237060547"/>
|
||||
<image name="chat_add_group.png" width="64" height="42.400001525878906"/>
|
||||
<image name="color_E.png" width="2" height="2"/>
|
||||
<image name="delete_default.png" width="34.400001525878906" height="44.799999237060547"/>
|
||||
<image name="delete_disabled.png" width="34.400001525878906" height="44.799999237060547"/>
|
||||
<image name="deselect_all.png" width="43.200000762939453" height="43.200000762939453"/>
|
||||
<image name="menu_resend_default.png" width="32" height="32"/>
|
||||
<image name="select_all_default.png" width="43.200000762939453" height="43.200000762939453"/>
|
||||
<image name="select_all_disabled.png" width="43.200000762939453" height="43.200000762939453"/>
|
||||
<systemColor name="secondarySystemBackgroundColor">
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
@property(nonatomic, strong) IBOutlet ChatsListTableView *tableController;
|
||||
@property(weak, nonatomic) IBOutlet UIButton *addButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *addGroupChatButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *chatRoomSwiftButton;
|
||||
@property(weak, nonatomic) IBOutlet UIBackToCallButton *backToCallButton;
|
||||
@property (weak, nonatomic) IBOutlet UIView *waitView;
|
||||
@property (weak, nonatomic) IBOutlet UIInterfaceStyleButton *toggleSelectionButton;
|
||||
|
|
@ -40,6 +41,7 @@
|
|||
|
||||
- (IBAction)onAddGroupChatClick:(id)event;
|
||||
- (IBAction)onAddClick:(id)event;
|
||||
- (IBAction)onChatRoomSwiftClick:(id)event;
|
||||
- (IBAction)onEditionChangeClick:(id)sender;
|
||||
- (IBAction)onDeleteClick:(id)sender;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#import "PhoneMainView.h"
|
||||
|
||||
#import "ChatConversationCreateView.h"
|
||||
#import "linphoneapp-Swift.h"
|
||||
@implementation ChatsListView
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
@ -159,6 +160,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneChatCreateViewChange object:VIEW(ChatConversationCreateView) userInfo:nil];
|
||||
}
|
||||
|
||||
- (IBAction)onChatRoomSwiftClick:(id)event {
|
||||
DetailChatRoomFragment *view = VIEW(DetailChatRoomFragment);
|
||||
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
|
||||
}
|
||||
|
||||
- (IBAction)onAddClick:(id)event {
|
||||
[self newChatCreate:FALSE];
|
||||
if (IPAD)
|
||||
|
|
|
|||
51
Classes/Swift/Chat/Views/DetailChatRoomFragment.swift
Normal file
51
Classes/Swift/Chat/Views/DetailChatRoomFragment.swift
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) 2010-2020 Belledonne Communications SARL.
|
||||
*
|
||||
* This file is part of linphone-iphone
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
import UIKit
|
||||
import Foundation
|
||||
import linphonesw
|
||||
|
||||
@objc class DetailChatRoomFragment: BackActionsNavigationView, UICompositeViewDelegate { // Replaces ChatConversationView
|
||||
|
||||
static let compositeDescription = UICompositeViewDescription(DetailChatRoomFragment.self, statusBar: StatusBarView.self, tabBar: nil, sideMenu: SideMenuView.self, fullscreen: false, isLeftFragment: false,fragmentWith: nil)
|
||||
static func compositeViewDescription() -> UICompositeViewDescription! { return compositeDescription }
|
||||
func compositeViewDescription() -> UICompositeViewDescription! { return type(of: self).compositeDescription }
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad(
|
||||
backAction: {
|
||||
self.goBackChatListView()
|
||||
},
|
||||
action1: {
|
||||
|
||||
},
|
||||
action2: {
|
||||
|
||||
},
|
||||
//title:"benoit.martins.test1"
|
||||
title:"Coin à champis de François"
|
||||
)
|
||||
view.backgroundColor = VoipTheme.backgroundColor3.get()
|
||||
}
|
||||
|
||||
func goBackChatListView() {
|
||||
PhoneMainView.instance().pop(toView: ChatsListView.compositeViewDescription())
|
||||
}
|
||||
}
|
||||
99
Classes/Swift/Util/BackActionsNavigationView.swift
Normal file
99
Classes/Swift/Util/BackActionsNavigationView.swift
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* Copyright (c) 2010-2020 Belledonne Communications SARL.
|
||||
*
|
||||
* This file is part of linphone-iphone
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
import UIKit
|
||||
import Foundation
|
||||
import linphonesw
|
||||
|
||||
@objc class BackActionsNavigationView: UIViewController {
|
||||
|
||||
|
||||
// layout constants
|
||||
let top_bar_height = 66.0
|
||||
let navigation_buttons_padding = 18.0
|
||||
let content_margin_top = 20
|
||||
let side_buttons_margin = 5
|
||||
|
||||
// User by subviews
|
||||
let form_margin = 10.0
|
||||
let form_input_height = 40.0
|
||||
let schdule_for_later_height = 80.0
|
||||
let description_height = 150.0
|
||||
|
||||
let titleLabel = StyledLabel(VoipTheme.calls_list_header_font)
|
||||
|
||||
let topBar = UIView()
|
||||
let scrollView = UIScrollView()
|
||||
let contentView = UIView()
|
||||
var backAction : (() -> Void)? = nil
|
||||
var action1 : (() -> Void)? = nil
|
||||
var action2 : (() -> Void)? = nil
|
||||
|
||||
let backButton = CallControlButton(buttonTheme:VoipTheme.nav_button("back_default"))
|
||||
let action1Button = CallControlButton(buttonTheme:VoipTheme.nav_button("call_audio_start_default"))
|
||||
let action2Button = CallControlButton(buttonTheme:VoipTheme.nav_button("more_menu_default"))
|
||||
|
||||
func viewDidLoad(backAction : @escaping () -> Void,
|
||||
action1 : @escaping () -> Void,
|
||||
action2 : @escaping () -> Void,
|
||||
title:String) {
|
||||
self.backAction = backAction
|
||||
self.action1 = action1
|
||||
self.action2 = action2
|
||||
|
||||
self.view.addSubview(topBar)
|
||||
topBar.alignParentTop().height(top_bar_height).matchParentSideBorders().done()
|
||||
|
||||
topBar.addSubview(backButton)
|
||||
backButton.alignParentLeft(withMargin: side_buttons_margin).matchParentHeight().done()
|
||||
backButton.onClickAction = backAction
|
||||
|
||||
topBar.addSubview(action2Button)
|
||||
action2Button.alignParentRight(withMargin: side_buttons_margin).matchParentHeight().done()
|
||||
action2Button.onClickAction = action2
|
||||
|
||||
topBar.addSubview(action1Button)
|
||||
action1Button.toLeftOf(action2Button, withRightMargin: 20).matchParentHeight().done()
|
||||
action1Button.onClickAction = action1
|
||||
|
||||
topBar.addSubview(titleLabel)
|
||||
titleLabel.toRightOf(backButton, withLeftMargin: 10).matchParentHeight().done()
|
||||
//let titlelabel = title.prefix(13)
|
||||
//titleLabel.text = title.count > 13 ? String(titlelabel+"...") : title
|
||||
titleLabel.text = title
|
||||
//titleLabel.truncationMode(.tail)
|
||||
|
||||
super.viewDidLoad()
|
||||
|
||||
view.addSubview(scrollView)
|
||||
scrollView.alignUnder(view: topBar, withMargin: content_margin_top).alignParentBottom().matchParentSideBorders().done()
|
||||
scrollView.addSubview(contentView)
|
||||
contentView.matchBordersOf(view: view).alignParentBottom().alignParentTop().done() // don't forget a bottom constraint b/w last element of contentview and contentview
|
||||
|
||||
}
|
||||
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
topBar.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -942,6 +942,8 @@
|
|||
D3F7998115BD32370018C273 /* TPMultiLayoutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F7998015BD32370018C273 /* TPMultiLayoutViewController.m */; };
|
||||
D3F83F8E15822ABE00336684 /* PhoneMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F83F8D15822ABD00336684 /* PhoneMainView.m */; };
|
||||
D7DA18712A02598700FABA0D /* TextViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DA18702A02598700FABA0D /* TextViewer.swift */; };
|
||||
D7421D9E29228A5200290CAB /* DetailChatRoomFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7421D9D29228A5200290CAB /* DetailChatRoomFragment.swift */; };
|
||||
D74A44912923BAF90017D063 /* BackActionsNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D74A44902923BAF90017D063 /* BackActionsNavigationView.swift */; };
|
||||
EA0007A62356008F003CC6BF /* msgNotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = EA5F25D9232BD3E200475F2E /* msgNotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
EA3650DB2330D2E30001148A /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA5F25DB232BD3E200475F2E /* NotificationService.swift */; };
|
||||
EA88A405242A6216007FEC61 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 63AADBC41B6A0FF200AA16FD /* Localizable.strings */; };
|
||||
|
|
@ -2171,6 +2173,10 @@
|
|||
D3F83F8C158229C500336684 /* PhoneMainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhoneMainView.h; sourceTree = "<group>"; };
|
||||
D3F83F8D15822ABD00336684 /* PhoneMainView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhoneMainView.m; sourceTree = "<group>"; };
|
||||
D7DA18702A02598700FABA0D /* TextViewer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextViewer.swift; sourceTree = "<group>"; };
|
||||
D7421D9D29228A5200290CAB /* DetailChatRoomFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailChatRoomFragment.swift; sourceTree = "<group>"; };
|
||||
D74A44902923BAF90017D063 /* BackActionsNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackActionsNavigationView.swift; sourceTree = "<group>"; };
|
||||
DF241FDC6C7431777AB3BD58 /* Pods-msgNotificationContent.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-msgNotificationContent.debug.xcconfig"; path = "Target Support Files/Pods-msgNotificationContent/Pods-msgNotificationContent.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
E19FC645A566E91D4EEB9C8F /* Pods-msgNotificationService.distributionadhoc.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-msgNotificationService.distributionadhoc.xcconfig"; path = "Target Support Files/Pods-msgNotificationService/Pods-msgNotificationService.distributionadhoc.xcconfig"; sourceTree = "<group>"; };
|
||||
EA5F25D9232BD3E200475F2E /* msgNotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = msgNotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA5F25DB232BD3E200475F2E /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
|
||||
EA5F25DD232BD3E200475F2E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
|
|
@ -3369,6 +3375,7 @@
|
|||
C63F720B285A24B10066163B /* ProviderDelegate.swift */,
|
||||
C63F720C285A24B10066163B /* VFSUtil.swift */,
|
||||
C63F71B1285A24B10066163B /* AppManager.swift */,
|
||||
D7421D99292283AE00290CAB /* Chat */,
|
||||
C63F7199285A24B10066163B /* Conference */,
|
||||
C63F71AA285A24B10066163B /* Util */,
|
||||
C63F71B2285A24B10066163B /* Extensions */,
|
||||
|
|
@ -3430,6 +3437,7 @@
|
|||
C63F71AE285A24B10066163B /* Pair.swift */,
|
||||
C63F71AF285A24B10066163B /* BackNextNavigationView.swift */,
|
||||
C63F71B0285A24B10066163B /* TimestampUtils.swift */,
|
||||
D74A44902923BAF90017D063 /* BackActionsNavigationView.swift */,
|
||||
);
|
||||
path = Util;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -3791,6 +3799,38 @@
|
|||
path = Viewers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7421D99292283AE00290CAB /* Chat */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7421D9A292283D300290CAB /* ViewModels */,
|
||||
D7421D9B292283E100290CAB /* Data */,
|
||||
D7421D9C292283ED00290CAB /* Views */,
|
||||
);
|
||||
path = Chat;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7421D9A292283D300290CAB /* ViewModels */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = ViewModels;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7421D9B292283E100290CAB /* Data */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = Data;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7421D9C292283ED00290CAB /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7421D9D29228A5200290CAB /* DetailChatRoomFragment.swift */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA5F25DA232BD3E200475F2E /* msgNotificationService */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -5058,6 +5098,7 @@
|
|||
D37C639B15AADEF6009D0BAC /* ContactDetailsTableView.m in Sources */,
|
||||
63E59A3F1ADE70D900646FB3 /* InAppProductsManager.m in Sources */,
|
||||
D3C6526715AC1A8F0092A874 /* UIContactDetailsCell.m in Sources */,
|
||||
D7421D9E29228A5200290CAB /* DetailChatRoomFragment.swift in Sources */,
|
||||
C63F7227285A24B10066163B /* UILabelExtensions.swift in Sources */,
|
||||
631348301B6F7B6600C6BDCB /* UIRoundBorderedButton.m in Sources */,
|
||||
C90FAA7915AF54E6002091CB /* HistoryDetailsView.m in Sources */,
|
||||
|
|
@ -5075,6 +5116,7 @@
|
|||
D3807FBF15C28940005BE9BC /* DCRoundSwitch.m in Sources */,
|
||||
D3807FC115C28940005BE9BC /* DCRoundSwitchKnobLayer.m in Sources */,
|
||||
61CCC3DF21933B580060EDEA /* UIDeviceCell.m in Sources */,
|
||||
D74A44912923BAF90017D063 /* BackActionsNavigationView.swift in Sources */,
|
||||
C63F725D285A24B10066163B /* SharedLayoutConstants.swift in Sources */,
|
||||
C63F7250285A24B10066163B /* CallStatsView.swift in Sources */,
|
||||
6306440E1BECB08500134C72 /* FirstLoginView.m in Sources */,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue