From 8a475831304d7242a22dbd5dfd22e445e0639d12 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Mon, 21 Nov 2022 11:23:01 +0100 Subject: [PATCH 1/4] set composig visible when _chatRoom is resolved --- Classes/ChatConversationView.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 3ce0df563..916742652 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -329,7 +329,6 @@ static UICompositeViewDescription *compositeDescription = nil; return; } composingVisible = !composingVisible; - [self setComposingVisible:!composingVisible withDelay:0]; // force offset recomputing [_messageField refreshHeight]; @@ -338,7 +337,10 @@ static UICompositeViewDescription *compositeDescription = nil; _chatRoom = linphone_core_get_chat_room([LinphoneManager getLc], peerAddr); isOneToOne = linphone_chat_room_get_capabilities(_chatRoom) & LinphoneChatRoomCapabilitiesOneToOne; isEncrypted = linphone_chat_room_get_capabilities(_chatRoom) & LinphoneChatRoomCapabilitiesEncrypted; + if (_chatRoom) + [self setComposingVisible:!composingVisible withDelay:0]; } + [self configureForRoom:true]; _backButton.hidden = _tableController.isEditing; [_tableController scrollToBottom:true]; From 62f7d8a620e41db0fbb40eb1c82104681e180c36 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Mon, 5 Sep 2022 18:58:11 +0200 Subject: [PATCH 2/4] =?UTF-8?q?0010414:=20Ios=20Build=202.1=20(3)=20Probl?= =?UTF-8?q?=C3=A9me=20d'affichage=20de=20la=20ligne=20de=20notification=20?= =?UTF-8?q?d'=C3=A9criture=20du=20correspondant.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Classes/ChatConversationView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 916742652..00184dfaa 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -794,9 +794,9 @@ static UICompositeViewDescription *compositeDescription = nil; // if we're showing the compose message, update it position if (![_composeLabel isHidden]) { - CGRect frame = [_composeLabel frame]; + CGRect frame = [_composeIndicatorView frame]; frame.origin.y -= diff; - [_composeLabel setFrame:frame]; + [_composeIndicatorView setFrame:frame]; } } } From 236a8ee52f40a22da12f013e4c5b85dc8ce8411a Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Fri, 18 Nov 2022 15:44:01 +0100 Subject: [PATCH 3/4] Fix recording list. Change of cell background color --- Classes/LinphoneUI/UICheckBoxTableView.m | 2 +- Classes/LinphoneUI/UIRecordingCell.h | 2 -- Classes/LinphoneUI/UIRecordingCell.m | 13 ++++++++----- Classes/RecordingsListTableView.m | 2 -- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Classes/LinphoneUI/UICheckBoxTableView.m b/Classes/LinphoneUI/UICheckBoxTableView.m index ab884b224..a01ed8746 100644 --- a/Classes/LinphoneUI/UICheckBoxTableView.m +++ b/Classes/LinphoneUI/UICheckBoxTableView.m @@ -91,8 +91,8 @@ #pragma mark - - (void)accessoryForCell:(UITableViewCell *)cell atPath:(NSIndexPath *)indexPath { - cell.selectionStyle = UITableViewCellSelectionStyleGray; if ([self isEditing]) { + cell.selectionStyle = UITableViewCellSelectionStyleGray; UIButton *checkBoxButton = [UIButton buttonWithType:UIButtonTypeCustom]; UIImage *image = nil; if ([_selectedItems containsObject:indexPath]) { diff --git a/Classes/LinphoneUI/UIRecordingCell.h b/Classes/LinphoneUI/UIRecordingCell.h index d8aef17aa..37a9bd458 100644 --- a/Classes/LinphoneUI/UIRecordingCell.h +++ b/Classes/LinphoneUI/UIRecordingCell.h @@ -25,8 +25,6 @@ @property (weak, nonatomic) IBOutlet UILabel *nameLabel; @property (strong, nonatomic) IBOutlet UIToolbar *toolbar; @property (weak, nonatomic) IBOutlet UIBarButtonItem *shareButton; - - @property(nonatomic, assign) __block NSString *recording; - (id)initWithIdentifier:(NSString*)identifier; diff --git a/Classes/LinphoneUI/UIRecordingCell.m b/Classes/LinphoneUI/UIRecordingCell.m index 1866749e0..d0492af7e 100644 --- a/Classes/LinphoneUI/UIRecordingCell.m +++ b/Classes/LinphoneUI/UIRecordingCell.m @@ -90,7 +90,8 @@ static UILinphoneAudioPlayer *player; } - (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated { - self.selectionStyle = UITableViewCellSelectionStyleNone; + if (!VIEW(RecordingsListView).tableController.isEditing) + self.selectionStyle = UITableViewCellSelectionStyleNone; } - (void)updateFrame { @@ -105,10 +106,11 @@ static UILinphoneAudioPlayer *player; -(void)setSelected:(BOOL)selected animated:(BOOL)animated{ [super setSelected:selected animated:animated]; - _toolbar.hidden = !selected; - if (!selected) { - return; - } + + if (!selected || (selected && VIEW(RecordingsListView).tableController.isEditing)) { + _toolbar.hidden = true; + return; + } if (player && [player isCreated]) { [player close]; } @@ -122,6 +124,7 @@ static UILinphoneAudioPlayer *player; player.view.frame = _playerView.frame; player.view.bounds = _playerView.bounds; [player open]; + _toolbar.hidden = false; } - (void)onShareButtonPressed { diff --git a/Classes/RecordingsListTableView.m b/Classes/RecordingsListTableView.m index 2bb4e3273..2260c261d 100644 --- a/Classes/RecordingsListTableView.m +++ b/Classes/RecordingsListTableView.m @@ -147,8 +147,6 @@ NSString *recordingPath = subAr[indexPath.row]; [cell setRecording:recordingPath]; [super accessoryForCell:cell atPath:indexPath]; - //accessoryForCell set it to gray but we don't want it - cell.selectionStyle = UITableViewCellSelectionStyleNone; [cell updateFrame]; cell.contentView.userInteractionEnabled = false; return cell; From bd42b8855ce32210088508638d640512733999dc Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Mon, 21 Nov 2022 12:07:18 +0100 Subject: [PATCH 4/4] Add hide_link_phone_number in RC setting for hide link_account view --- Classes/AssistantView.m | 6 +++++- Classes/LinphoneManager.m | 6 +++++- Classes/SideMenuTableView.m | 2 +- Resources/linphonerc-factory | 2 ++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Classes/AssistantView.m b/Classes/AssistantView.m index eaec0af23..51e86b2a0 100644 --- a/Classes/AssistantView.m +++ b/Classes/AssistantView.m @@ -1158,7 +1158,11 @@ static UICompositeViewDescription *compositeDescription = nil; _outgoingView = DialerView.compositeViewDescription; [self configureAccount]; } else if (status == LinphoneAccountCreatorStatusAccountExist) { - _outgoingView = AssistantLinkView.compositeViewDescription; + if([LinphoneManager.instance lpConfigIntForKey:@"hide_link_phone_number"]){ + _outgoingView = DialerView.compositeViewDescription; + }else{ + _outgoingView = AssistantLinkView.compositeViewDescription; + } [self configureAccount]; } else { if (resp) { diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index b1c2b8654..c7c0681d2 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -282,6 +282,10 @@ struct codec_name_pref_table codec_pref_table[] = {{"speex", 8000, "speex_8k_pre if ([self lpConfigStringForKey:@"display_link_account_popup"] == nil) { [self lpConfigSetBool:true forKey:@"display_link_account_popup"]; } + + if ([self lpConfigStringForKey:@"hide_link_phone_number"] == nil) { + [self lpConfigSetInt:1 forKey:@"hide_link_phone_number"]; + } [self migrateFromUserPrefs]; [self loadAvatar]; @@ -1312,7 +1316,7 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat NSDate *nextTime = [NSDate dateWithTimeIntervalSince1970:[self lpConfigIntForKey:@"must_link_account_time" withDefault:1]]; NSDate *now = [NSDate date]; - if (nextTime.timeIntervalSince1970 > 0 && [now earlierDate:nextTime] == nextTime && [LinphoneManager.instance lpConfigBoolForKey:@"display_link_account_popup"]) { + if (nextTime.timeIntervalSince1970 > 0 && [now earlierDate:nextTime] == nextTime && [LinphoneManager.instance lpConfigBoolForKey:@"display_link_account_popup"] && ![LinphoneManager.instance lpConfigIntForKey:@"hide_link_phone_number"]) { LinphoneAccount *account = linphone_core_get_default_account(LC); if (account) { const char *username = linphone_address_get_username(linphone_account_params_get_identity_address(linphone_account_get_params(account))); diff --git a/Classes/SideMenuTableView.m b/Classes/SideMenuTableView.m index e8a8fcb7a..94b41152e 100644 --- a/Classes/SideMenuTableView.m +++ b/Classes/SideMenuTableView.m @@ -70,7 +70,7 @@ MSList *accounts = [LinphoneManager.instance createAccountsNotHiddenList]; BOOL hasAccount = accounts != NULL; bctbx_free(accounts); - if (mustLink && hasAccount) { + if (mustLink && hasAccount && ![LinphoneManager.instance lpConfigIntForKey:@"hide_link_phone_number"]) { [_sideMenuEntries addObject:[[SideMenuEntry alloc] initWithTitle:NSLocalizedString(@"Link my account", nil) image:[UIImage imageNamed:@"menu_link_account.png"] diff --git a/Resources/linphonerc-factory b/Resources/linphonerc-factory index db5ba7642..c0793518a 100644 --- a/Resources/linphonerc-factory +++ b/Resources/linphonerc-factory @@ -30,6 +30,8 @@ accept_early_media=0 force_lime_chat_rooms=0 enable_native_address_book=1 +hide_link_phone_number=0 + [rtp] accept_any_encryption=1