forked from mirrors/linphone-iphone
Remove Ipad condition in ChatListView and ChatListTableView
Fix contact authorization status popup
This commit is contained in:
parent
9a97af80e5
commit
e70190dc2c
4 changed files with 14 additions and 6 deletions
|
|
@ -95,9 +95,11 @@
|
|||
[super viewDidAppear:animated];
|
||||
// we cannot do that in viewWillAppear because we will change view while previous transition
|
||||
// was not finished, leading to "[CALayer retain]: message sent to deallocated instance" error msg
|
||||
/*
|
||||
if (IPAD && [self totalNumberOfItems] > 0) {
|
||||
[PhoneMainView.instance changeCurrentView:ChatConversationView.compositeViewDescription];
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
|
|
@ -158,6 +160,7 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo
|
|||
_data = [self sortChatRooms];
|
||||
[super loadData];
|
||||
|
||||
/*
|
||||
if (IPAD) {
|
||||
int idx = bctbx_list_index(_data, VIEW(ChatConversationView).chatRoom);
|
||||
// if conversation view is using a chatroom that does not exist anymore, update it
|
||||
|
|
@ -175,6 +178,7 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo
|
|||
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
- (void)updateEventEntry:(LinphoneChatMessage *)msg {
|
||||
|
|
@ -190,10 +194,12 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo
|
|||
- (void)markCellAsRead:(LinphoneChatRoom *)chatRoom {
|
||||
int idx = bctbx_list_index(_data, VIEW(ChatConversationView).chatRoom);
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:idx inSection:0];
|
||||
/*
|
||||
if (IPAD) {
|
||||
UIChatCell *cell = (UIChatCell *)[self.tableView cellForRowAtIndexPath:indexPath];
|
||||
[cell updateUnreadBadge];
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource Functions
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (IBAction)onAddGroupChatClick:(id)event {
|
||||
[self newChatCreate:TRUE];
|
||||
if (IPAD)
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneChatCreateViewChange object:VIEW(ChatConversationCreateView) userInfo:nil];
|
||||
//if (IPAD)
|
||||
//[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneChatCreateViewChange object:VIEW(ChatConversationCreateView) userInfo:nil];
|
||||
}
|
||||
|
||||
- (IBAction)onChatRoomSwiftClick:(id)event {
|
||||
|
|
@ -166,8 +166,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (IBAction)onAddClick:(id)event {
|
||||
[self newChatCreate:FALSE];
|
||||
if (IPAD)
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneChatCreateViewChange object:VIEW(ChatConversationCreateView) userInfo:nil];
|
||||
//if (IPAD)
|
||||
//[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneChatCreateViewChange object:VIEW(ChatConversationCreateView) userInfo:nil];
|
||||
}
|
||||
|
||||
- (IBAction)onEditionChangeClick:(id)sender {
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
}
|
||||
|
||||
+ (BOOL)isAuthorized {
|
||||
return ![LinphoneManager.instance lpConfigBoolForKey:@"enable_native_address_book"] || [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts];
|
||||
return ![LinphoneManager.instance lpConfigBoolForKey:@"enable_native_address_book"] || [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts] == CNAuthorizationStatusAuthorized;
|
||||
}
|
||||
|
||||
- (FastAddressBook *)init {
|
||||
|
|
|
|||
4
Podfile
4
Podfile
|
|
@ -29,8 +29,10 @@ target 'linphone' do
|
|||
pod 'SnapKit', '~> 5.6.0'
|
||||
pod 'DropDown'
|
||||
pod 'IQKeyboardManager'
|
||||
pod 'SwipeCellKit' #License: https://github.com/SwipeCellKit/SwipeCellKit/blob/develop/LICENSE
|
||||
pod 'SwipeCellKit'
|
||||
#License: https://github.com/SwipeCellKit/SwipeCellKit/blob/develop/LICENSE
|
||||
pod 'EmojiPicker', :git => 'https://github.com/htmlprogrammist/EmojiPicker'
|
||||
#License: https://github.com/htmlprogrammist/EmojiPicker/blob/main/LICENSE
|
||||
all_pods
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue