mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix light and dark mode
This commit is contained in:
parent
54bfcb22e0
commit
04086fb5f2
6 changed files with 38 additions and 14 deletions
|
|
@ -456,7 +456,7 @@
|
|||
linphone_address_unref(local);
|
||||
// TODO : Find a better fix
|
||||
VIEW(ChatConversationView).markAsRead = FALSE;
|
||||
[PhoneMainView.instance goToChatRoom:cr];
|
||||
[PhoneMainView.instance goToChatRoomSwift:cr];
|
||||
}
|
||||
}
|
||||
return YES;
|
||||
|
|
@ -675,7 +675,8 @@
|
|||
LinphoneAddress *local = linphone_address_new(local_address.UTF8String);
|
||||
LinphoneChatRoom *room = linphone_core_find_chat_room(LC, peer, local);
|
||||
if (room) {
|
||||
[PhoneMainView.instance goToChatRoom:room];
|
||||
[PhoneMainView.instance resetBeforeGoToChatRoomSwift];
|
||||
[PhoneMainView.instance goToChatRoomSwift:room];
|
||||
return;
|
||||
}
|
||||
[PhoneMainView.instance changeCurrentView:ChatsListView.compositeViewDescription];
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@
|
|||
- (LinphoneChatRoom *)createChatRoom:(const char *)subject addresses:(bctbx_list_t *)addresses andWaitView:(UIView *)waitView isEncrypted:(BOOL)isEncrypted isGroup:(BOOL)isGroup;
|
||||
- (void)goToChatRoom:(LinphoneChatRoom *)cr;
|
||||
- (void)goToChatRoomSwift:(LinphoneChatRoom *)cr;
|
||||
- (void)resetBeforeGoToChatRoomSwift;
|
||||
+ (PhoneMainView*) instance;
|
||||
|
||||
- (BOOL)isIphoneXDevice;
|
||||
|
|
|
|||
|
|
@ -929,12 +929,16 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
_waitView.hidden = YES;
|
||||
_waitView = NULL;
|
||||
ChatConversationViewSwift *view = VIEW(ChatConversationViewSwift);
|
||||
|
||||
[view initChatRoomWithCChatRoom:cr];
|
||||
|
||||
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
|
||||
}
|
||||
|
||||
- (void)resetBeforeGoToChatRoomSwift{
|
||||
ChatConversationViewSwift *view = VIEW(ChatConversationViewSwift);
|
||||
[view resetView];
|
||||
}
|
||||
|
||||
void main_view_chat_room_conference_joined(LinphoneChatRoom *cr, const LinphoneEventLog *event_log) {
|
||||
PhoneMainView *view = PhoneMainView.instance;
|
||||
LOGI(@"Chat room [%p] conference joined.", cr);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ import AVFoundation
|
|||
|
||||
let collectionView = UICollectionView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: top_bar_height*2), collectionViewLayout: layout)
|
||||
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||
collectionView.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
collectionView.backgroundColor = .clear
|
||||
return collectionView
|
||||
}()
|
||||
|
||||
|
|
@ -261,16 +261,17 @@ import AVFoundation
|
|||
initSharedPlayer()
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
chatRoom?.removeDelegate(delegate: chatRoomDelegate!)
|
||||
editModeOff()
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
tableController.reloadData()
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
resetView()
|
||||
}
|
||||
|
||||
@objc func resetView(){
|
||||
chatRoom?.removeDelegate(delegate: chatRoomDelegate!)
|
||||
editModeOff()
|
||||
|
||||
if(self.isComposingView.isHidden == false){
|
||||
self.isComposingView.isHidden = true
|
||||
|
|
@ -541,6 +542,8 @@ import AVFoundation
|
|||
let secureLevel = FastAddressBook.image(for: linphone_chat_room_get_security_level(cChatRoom))
|
||||
changeSecureLevel(secureLevel: secureLevel != nil, imageBadge: secureLevel)
|
||||
initDataSource(groupeChat: !isOneToOneChat, secureLevel: secureLevel != nil, cChatRoom: cChatRoom)
|
||||
self.viewWillAppear(true)
|
||||
//tableController.chatRoom = chatRoom?.getCobject
|
||||
}
|
||||
|
||||
func updateParticipantLabel(){
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ class MessageView: UIView, UITextViewDelegate {
|
|||
messageText.matchParentDimmensions(insetedByDx: 10).done()
|
||||
messageText.font = UIFont.systemFont(ofSize: 18)
|
||||
messageText.delegate = self
|
||||
|
||||
UIDeviceBridge.displayModeSwitched.readCurrentAndObserve { _ in
|
||||
self.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
}
|
||||
}
|
||||
|
||||
func textViewDidChangeSelection(_ textView: UITextView) {
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@ import SnapKit
|
|||
let replyContentTextView = StyledLabel(VoipTheme.chat_conversation_reply_content)
|
||||
let replyContentTextSpacing = UIView()
|
||||
let replyContentForMeetingTextView = StyledLabel(VoipTheme.chat_conversation_reply_content)
|
||||
let replyDeleteButton = CallControlButton(width: 22, height: 22, buttonTheme:VoipTheme.nav_black_button("reply_cancel"))
|
||||
let replyDeleteButton = CallControlButton(width: 22, height: 22, buttonTheme:VoipTheme.nav_button("reply_cancel"))
|
||||
let replyMeetingSchedule = UIImageView()
|
||||
let recordingView = UIView()
|
||||
let recordingDeleteButton = CallControlButton(width: 40, height: 40, buttonTheme:VoipTheme.nav_black_button("delete_default"))
|
||||
let recordingPlayButton = CallControlButton(width: 40, height: 40, buttonTheme:VoipTheme.nav_black_button("vr_play"))
|
||||
let recordingStopButton = CallControlButton(width: 40, height: 40, buttonTheme:VoipTheme.nav_black_button("vr_stop"))
|
||||
let recordingDeleteButton = CallControlButton(width: 40, height: 40, buttonTheme:VoipTheme.nav_button("delete_default"))
|
||||
let recordingPlayButton = CallControlButton(width: 40, height: 40, buttonTheme:VoipTheme.nav_button("vr_play"))
|
||||
let recordingStopButton = CallControlButton(width: 40, height: 40, buttonTheme:VoipTheme.nav_button("vr_stop"))
|
||||
let recordingWaveView = UIProgressView()
|
||||
let recordingDurationTextView = StyledLabel(VoipTheme.chat_conversation_recording_duration)
|
||||
let recordingWaveImage = UIImageView(image: UIImage(named: "vr_wave.png"))
|
||||
|
|
@ -178,7 +178,7 @@ import SnapKit
|
|||
stackView.addArrangedSubview(replyBubble)
|
||||
replyBubble.matchParentSideBorders().maxHeight(top_bar_height*3).done()
|
||||
replyBubble.translatesAutoresizingMaskIntoConstraints = false
|
||||
replyBubble.backgroundColor = VoipTheme.backgroundWhiteBlack.get()
|
||||
replyBubble.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
replyBubble.isHidden = true
|
||||
|
||||
replyBubble.addSubview(backgroundReplyColor)
|
||||
|
|
@ -278,6 +278,17 @@ import SnapKit
|
|||
stackView.centerYAnchor.constraint(equalTo:self.view.centerYAnchor).isActive = true
|
||||
|
||||
view.bringSubviewToFront(topBar)
|
||||
|
||||
UIDeviceBridge.displayModeSwitched.readCurrentAndObserve { _ in
|
||||
self.topBar.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
self.titleParticipants.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
self.replyBubble.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
self.recordingView.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
self.mediaSelector.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
|
||||
self.isComposingView.backgroundColor = VoipTheme.backgroundWhiteBlack.get()
|
||||
self.recordingWaveView.backgroundColor = VoipTheme.backgroundWhiteBlack.get()
|
||||
self.recordingWaveImageMask.backgroundColor = VoipTheme.backgroundWhiteBlack.get()
|
||||
}
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue