mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 14:16:59 +02:00
Merge branch 'develop' into gil/6663-MSC3771_read_receipts_for_threads
This commit is contained in:
@@ -440,7 +440,9 @@
|
||||
|
||||
- (void)startUserVerification
|
||||
{
|
||||
[[AppDelegate theDelegate] presentUserVerificationForRoomMember:self.mxRoomMember session:self.mainSession];
|
||||
[[AppDelegate theDelegate] presentUserVerificationForRoomMember:self.mxRoomMember session:self.mainSession completion:^{
|
||||
[self refreshUserEncryptionTrustLevel];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)presentUserVerification
|
||||
@@ -1332,6 +1334,7 @@
|
||||
|
||||
- (void)keyVerificationCoordinatorBridgePresenterDelegateDidComplete:(KeyVerificationCoordinatorBridgePresenter *)coordinatorBridgePresenter otherUserId:(NSString * _Nonnull)otherUserId otherDeviceId:(NSString * _Nonnull)otherDeviceId
|
||||
{
|
||||
[self refreshUserEncryptionTrustLevel];
|
||||
[self dismissKeyVerificationCoordinatorBridgePresenter];
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,10 @@ extern NSNotificationName const RoomCallTileTappedNotification;
|
||||
Notification string used to indicate group call tile tapped in a room. Notification object will be the `RoomBubbleCellData` object.
|
||||
*/
|
||||
extern NSNotificationName const RoomGroupCallTileTappedNotification;
|
||||
/**
|
||||
Duration for the composer resize animation.
|
||||
*/
|
||||
extern NSTimeInterval const kResizeComposerAnimationDuration;
|
||||
|
||||
@interface RoomViewController : MXKRoomViewController
|
||||
|
||||
|
||||
@@ -6255,7 +6255,13 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
|
||||
// Acknowledge the existence of all devices
|
||||
[self startActivityIndicator];
|
||||
[self.mainSession.crypto setDevicesKnown:self->unknownDevices complete:^{
|
||||
|
||||
if (![self.mainSession.crypto isKindOfClass:[MXLegacyCrypto class]])
|
||||
{
|
||||
MXLogFailure(@"[RoomVC] eventDidChangeSentState: Only legacy crypto supports manual setting of known devices");
|
||||
return;
|
||||
}
|
||||
[(MXLegacyCrypto *)self.mainSession.crypto setDevicesKnown:self->unknownDevices complete:^{
|
||||
|
||||
self->unknownDevices = nil;
|
||||
[self stopActivityIndicator];
|
||||
|
||||
@@ -806,7 +806,7 @@ static BOOL _disableLongPressGestureOnEvent;
|
||||
mimetype = bubbleData.attachment.contentInfo[@"mimetype"];
|
||||
}
|
||||
|
||||
if ([mimetype isEqualToString:@"image/gif"])
|
||||
if ([mimetype isKindOfClass:[NSString class]] && [mimetype isEqualToString:@"image/gif"])
|
||||
{
|
||||
if (_isAutoAnimatedGif)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
|
||||
private var heightConstraint: NSLayoutConstraint!
|
||||
private var hostingViewController: VectorHostingController!
|
||||
private var wysiwygViewModel = WysiwygComposerViewModel(textColor: ThemeService.shared().theme.colors.primaryContent)
|
||||
private var viewModel: ComposerViewModelProtocol = ComposerViewModel(initialViewState: ComposerViewState())
|
||||
private var viewModel: ComposerViewModelProtocol = ComposerViewModel(initialViewState: ComposerViewState(bindings: ComposerBindings(focused: false)))
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@@ -69,8 +69,10 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
|
||||
|
||||
inputAccessoryViewForKeyboard = UIView(frame: .zero)
|
||||
|
||||
let composer = Composer(viewModel: viewModel.context,
|
||||
let composer = Composer(
|
||||
viewModel: viewModel.context,
|
||||
wysiwygViewModel: wysiwygViewModel,
|
||||
resizeAnimationDuration: Double(kResizeComposerAnimationDuration),
|
||||
sendMessageAction: { [weak self] content in
|
||||
guard let self = self else { return }
|
||||
self.sendWysiwygMessage(content: content)
|
||||
@@ -88,7 +90,7 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
|
||||
let subView: UIView = hostingViewController.view
|
||||
self.addSubview(subView)
|
||||
|
||||
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
self.translatesAutoresizingMaskIntoConstraints = false
|
||||
subView.translatesAutoresizingMaskIntoConstraints = false
|
||||
heightConstraint = subView.heightAnchor.constraint(equalToConstant: height)
|
||||
NSLayoutConstraint.activate([
|
||||
@@ -103,7 +105,13 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
|
||||
.sink(receiveValue: { [weak self] idealHeight in
|
||||
guard let self = self else { return }
|
||||
self.updateToolbarHeight(wysiwygHeight: idealHeight)
|
||||
})
|
||||
}),
|
||||
// Required to update the view constraints after minimise/maximise is tapped
|
||||
wysiwygViewModel.$idealHeight
|
||||
.removeDuplicates()
|
||||
.sink { [weak hostingViewController] _ in
|
||||
hostingViewController?.view.setNeedsLayout()
|
||||
}
|
||||
]
|
||||
|
||||
update(theme: ThemeService.shared().theme)
|
||||
@@ -115,6 +123,10 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
|
||||
self.backgroundColor = .clear
|
||||
}
|
||||
|
||||
override func dismissKeyboard() {
|
||||
self.viewModel.dismissKeyboard()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func updateToolbarHeight(wysiwygHeight: CGFloat) {
|
||||
|
||||
Reference in New Issue
Block a user