diff --git a/Classes/Base.lproj/ChatsListView.xib b/Classes/Base.lproj/ChatsListView.xib index 187a5fca5..0b4bd78ab 100644 --- a/Classes/Base.lproj/ChatsListView.xib +++ b/Classes/Base.lproj/ChatsListView.xib @@ -14,6 +14,7 @@ + @@ -64,6 +65,21 @@ + + + + + + + + + + + + + + + @@ -225,6 +241,7 @@ + diff --git a/Classes/ChatsListView.h b/Classes/ChatsListView.h index 939b87bbe..fcfb0b068 100644 --- a/Classes/ChatsListView.h +++ b/Classes/ChatsListView.h @@ -41,6 +41,7 @@ - (IBAction)onAddGroupChatClick:(id)event; - (IBAction)onAddClick:(id)event; +- (IBAction)onChatRoomSwiftClick:(id)event; - (IBAction)onEditionChangeClick:(id)sender; - (IBAction)onDeleteClick:(id)sender; diff --git a/Classes/ChatsListView.m b/Classes/ChatsListView.m index 945a25dd0..ec3c1db95 100644 --- a/Classes/ChatsListView.m +++ b/Classes/ChatsListView.m @@ -160,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) diff --git a/Classes/Swift/Chat/Views/DetailChatRoomFragment.swift b/Classes/Swift/Chat/Views/DetailChatRoomFragment.swift new file mode 100644 index 000000000..df2312d81 --- /dev/null +++ b/Classes/Swift/Chat/Views/DetailChatRoomFragment.swift @@ -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 . + */ + + +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()) + } +} diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 07349657e..3d1c9ad74 100644 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -959,6 +959,8 @@ D7C6DE842948CF3100756E03 /* DropDownCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D7C6DE822948CF3100756E03 /* DropDownCell.xib */; }; D7DA18712A02598700FABA0D /* TextViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DA18702A02598700FABA0D /* TextViewer.swift */; }; E70B197572D19B07588680EB /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; + 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 */; }; @@ -2204,6 +2206,10 @@ DD19DC5D06D55FAD917E500E /* Pods_msgNotificationContent.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_msgNotificationContent.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DE96375EAB367B50A6F75547 /* Pods-msgNotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-msgNotificationService.release.xcconfig"; path = "Target Support Files/Pods-msgNotificationService/Pods-msgNotificationService.release.xcconfig"; sourceTree = ""; }; DEBE74B126D0D0F003F899E7 /* Pods-msgNotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-msgNotificationService.debug.xcconfig"; path = "Target Support Files/Pods-msgNotificationService/Pods-msgNotificationService.debug.xcconfig"; sourceTree = ""; }; + D7421D9D29228A5200290CAB /* DetailChatRoomFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailChatRoomFragment.swift; sourceTree = ""; }; + D74A44902923BAF90017D063 /* BackActionsNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackActionsNavigationView.swift; sourceTree = ""; }; + 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 = ""; }; + 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 = ""; }; 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 = ""; }; EA5F25DD232BD3E200475F2E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -3862,6 +3868,7 @@ D71418E229C9B4E0002EEF75 /* DownloadMessageCell.swift */, D71418E429C9E2CD002EEF75 /* CircularProgressBarView.swift */, D768763429CDA88200570747 /* UploadMessageCell.swift */, + D7421D9D29228A5200290CAB /* DetailChatRoomFragment.swift */, ); path = Views; sourceTree = ""; @@ -5154,6 +5161,7 @@ 63E59A3F1ADE70D900646FB3 /* InAppProductsManager.m in Sources */, D3C6526715AC1A8F0092A874 /* UIContactDetailsCell.m in Sources */, D7421D9E29228A5200290CAB /* ChatConversationViewSwift.swift in Sources */, + D7421D9E29228A5200290CAB /* DetailChatRoomFragment.swift in Sources */, C63F7227285A24B10066163B /* UILabelExtensions.swift in Sources */, 631348301B6F7B6600C6BDCB /* UIRoundBorderedButton.m in Sources */, C90FAA7915AF54E6002091CB /* HistoryDetailsView.m in Sources */,