mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Fixes Test Plan 5.2
This commit is contained in:
parent
bb9f850704
commit
723227b87e
4 changed files with 33 additions and 13 deletions
|
|
@ -238,6 +238,7 @@
|
|||
intentIdentifiers:[[NSMutableArray alloc] init]
|
||||
options:UNNotificationCategoryOptionCustomDismissAction];
|
||||
// Msg category
|
||||
/*
|
||||
UNTextInputNotificationAction *act_reply =
|
||||
[UNTextInputNotificationAction actionWithIdentifier:@"Reply"
|
||||
title:NSLocalizedString(@"Reply", nil)
|
||||
|
|
@ -251,7 +252,8 @@
|
|||
actions:[NSArray arrayWithObjects:act_reply, act_seen, nil]
|
||||
intentIdentifiers:[[NSMutableArray alloc] init]
|
||||
options:UNNotificationCategoryOptionCustomDismissAction];
|
||||
|
||||
*/
|
||||
|
||||
// Video Request Category
|
||||
UNNotificationAction *act_accept =
|
||||
[UNNotificationAction actionWithIdentifier:@"Accept"
|
||||
|
|
@ -282,7 +284,9 @@
|
|||
options:UNNotificationCategoryOptionCustomDismissAction];
|
||||
|
||||
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
|
||||
NSSet *categories = [NSSet setWithObjects:cat_call, cat_msg, video_call, cat_zrtp, nil];
|
||||
//NSSet *categories = [NSSet setWithObjects:cat_call, cat_msg, video_call, cat_zrtp, nil];
|
||||
NSSet *categories = [NSSet setWithObjects:cat_call
|
||||
, video_call, cat_zrtp, nil];
|
||||
[[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:categories];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class ChatConversationViewModel {
|
|||
var mediaCollectionView : [UIImage] = []
|
||||
var replyCollectionView : [UIImage] = []
|
||||
|
||||
var isComposing = MutableLiveData<Bool>(false)
|
||||
var isComposing = MutableLiveData<Int>(0)
|
||||
var messageReceived = MutableLiveData<EventLog>()
|
||||
var stateChanged = MutableLiveData<ChatRoom>()
|
||||
var secureLevelChanged = MutableLiveData<EventLog>()
|
||||
|
|
@ -132,7 +132,7 @@ class ChatConversationViewModel {
|
|||
}
|
||||
|
||||
func on_chat_room_is_composing_received(_ cr: ChatRoom?, _ remoteAddr: Address?, _ isComposingBool: Bool) {
|
||||
isComposing.value = (linphone_chat_room_is_remote_composing(cr?.getCobject) != 0) || bctbx_list_size(linphone_chat_room_get_composing_addresses(cr?.getCobject)) > 0
|
||||
isComposing.value = bctbx_list_size(linphone_chat_room_get_composing_addresses(cr?.getCobject))
|
||||
}
|
||||
|
||||
func on_chat_room_chat_message_received(_ cr: ChatRoom?, _ event_log: EventLog?) {
|
||||
|
|
|
|||
|
|
@ -176,9 +176,13 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
|
|||
contentMessageView.floatingButton.addTarget(self, action: #selector(self.alertActionGoToDevicesList), for: .touchUpInside)
|
||||
|
||||
ChatConversationViewModel.sharedModel.isComposing.observe { compose in
|
||||
if((compose! && self.contentMessageView.isComposingView.isHidden)||(!compose! && !self.contentMessageView.isComposingView.isHidden)){
|
||||
/*
|
||||
if((compose! > 0 && self.contentMessageView.isComposingView.isHidden)||(compose! == 0 && !self.contentMessageView.isComposingView.isHidden)){
|
||||
print("on_chat_room_is_composing_received isComposing \(compose)")
|
||||
self.setComposingVisible(compose!, withDelay: 0.3)
|
||||
}
|
||||
*/
|
||||
self.setComposingVisible(compose!, withDelay: 0.3)
|
||||
}
|
||||
|
||||
ChatConversationViewModel.sharedModel.messageReceived.observe { message in
|
||||
|
|
@ -810,7 +814,7 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
|
|||
} else {
|
||||
contentMessageView.messageView.messageText.text = ""
|
||||
}
|
||||
contentMessageView.messageView.emojisButton.isHidden = false
|
||||
contentMessageView.messageView.emojisButton.isHidden = true
|
||||
contentMessageView.messageView.isComposing = false
|
||||
}
|
||||
setSendButtonState()
|
||||
|
|
@ -890,10 +894,10 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
|
|||
if fileTransfer.text.isEmpty && !contentMessageView.messageView.messageText.isFirstResponder{
|
||||
contentMessageView.messageView.messageText.textColor = UIColor.lightGray
|
||||
contentMessageView.messageView.messageText.text = "Message"
|
||||
contentMessageView.messageView.emojisButton.isHidden = false
|
||||
contentMessageView.messageView.emojisButton.isHidden = true
|
||||
} else {
|
||||
contentMessageView.messageView.messageText.text = ""
|
||||
contentMessageView.messageView.emojisButton.isHidden = false
|
||||
contentMessageView.messageView.emojisButton.isHidden = true
|
||||
}
|
||||
contentMessageView.messageView.sendButton.isEnabled = false
|
||||
|
||||
|
|
@ -917,8 +921,9 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
|
|||
tableControllerSwift.refreshData(isOutgoing: true)
|
||||
}
|
||||
|
||||
func setComposingVisible(_ visible: Bool, withDelay delay: CGFloat) {
|
||||
if visible {
|
||||
func setComposingVisible(_ visible: Int, withDelay delay: CGFloat) {
|
||||
print("setComposingVisiblesetComposingVisible \(ChatConversationViewModel.sharedModel.chatRoom!.composingAddresses.count)")
|
||||
if visible > 0 {
|
||||
let addresses = ChatConversationViewModel.sharedModel.chatRoom!.composingAddresses
|
||||
var composingAddresses : String? = ""
|
||||
if addresses.count == 1 {
|
||||
|
|
@ -935,9 +940,15 @@ class ChatConversationViewSwift: BackActionsNavigationView, PHPickerViewControll
|
|||
contentMessageView.isComposingTextView.text = String.localizedStringWithFormat(NSLocalizedString("%@ are writing...", comment: ""), composingAddresses!)
|
||||
}
|
||||
}
|
||||
UIView.animate(withDuration: 0.3, animations: {
|
||||
self.contentMessageView.isComposingView.isHidden = !self.contentMessageView.isComposingView.isHidden
|
||||
})
|
||||
if visible == 0 {
|
||||
UIView.animate(withDuration: 0.3, animations: {
|
||||
self.contentMessageView.isComposingView.isHidden = true
|
||||
})
|
||||
} else {
|
||||
UIView.animate(withDuration: 0.3, animations: {
|
||||
self.contentMessageView.isComposingView.isHidden = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func selectionMedia() {
|
||||
|
|
|
|||
|
|
@ -2172,6 +2172,11 @@ class MultilineMessageCell: SwipeCollectionViewCell, UICollectionViewDataSource,
|
|||
ChatConversationTableViewModel.sharedModel.reloadCollectionViewCell()
|
||||
indexTransferProgress = -1
|
||||
}
|
||||
|
||||
if !VFSUtil.vfsEnabled(groupName: kLinphoneMsgNotificationAppGroupId) && ConfigManager.instance().lpConfigBoolForKey(key: "auto_write_to_gallery_preference") {
|
||||
ChatConversationViewModel.sharedModel.writeMediaToGalleryFromName(content.name, fileType: content.type)
|
||||
}
|
||||
|
||||
} else {
|
||||
if (indexTransferProgress > -1 && downloadContentCollection[indexTransferProgress] != nil && indexTransferProgress > -1) {
|
||||
downloadContentCollection[indexTransferProgress]!.setUpCircularProgressBarView(toValue: p)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue