mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-29 20:56:57 +02:00
Update environment object setup and view model context wrapping to restore SwiftUI UI tests
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
@class RoomInputToolbarView;
|
||||
@class LinkActionWrapper;
|
||||
@class SuggestionPatternWrapper;
|
||||
@class UserSuggestionSharedContext;
|
||||
@class UserSuggestionViewModelContextWrapper;
|
||||
|
||||
/**
|
||||
Destination of the message in the composer
|
||||
@@ -84,7 +84,9 @@ typedef NS_ENUM(NSUInteger, RoomInputToolbarViewSendMode)
|
||||
|
||||
- (void)didDetectTextPattern: (SuggestionPatternWrapper *)suggestionPattern;
|
||||
|
||||
- (UserSuggestionSharedContext *)userSuggestionContext;
|
||||
- (UserSuggestionViewModelContextWrapper *)userSuggestionContext;
|
||||
|
||||
- (MXMediaManager *)mediaManager;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
|
||||
let composer = Composer(
|
||||
viewModel: viewModel.context,
|
||||
wysiwygViewModel: wysiwygViewModel,
|
||||
userSuggestionSharedContext: toolbarViewDelegate.userSuggestionContext(),
|
||||
userSuggestionSharedContext: toolbarViewDelegate.userSuggestionContext().context,
|
||||
resizeAnimationDuration: Double(kResizeComposerAnimationDuration),
|
||||
sendMessageAction: { [weak self] content in
|
||||
guard let self = self else { return }
|
||||
@@ -227,10 +227,12 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
|
||||
}, showSendMediaActions: { [weak self] in
|
||||
guard let self = self else { return }
|
||||
self.showSendMediaActions()
|
||||
}).introspectTextView { [weak self] textView in
|
||||
guard let self = self else { return }
|
||||
textView.inputAccessoryView = self.inputAccessoryViewForKeyboard
|
||||
}
|
||||
})
|
||||
.introspectTextView { [weak self] textView in
|
||||
guard let self = self else { return }
|
||||
textView.inputAccessoryView = self.inputAccessoryViewForKeyboard
|
||||
}
|
||||
.environmentObject(AvatarViewModel(avatarService: AvatarService(mediaManager: toolbarViewDelegate.mediaManager())))
|
||||
|
||||
hostingViewController = VectorHostingController(rootView: composer)
|
||||
hostingViewController.publishHeightChanges = true
|
||||
|
||||
Reference in New Issue
Block a user