Enable polls in threads as the SDK supports them now.
This commit is contained in:
committed by
Stefan Ceriu
parent
3726bcd012
commit
e5a0519a9f
@@ -82,8 +82,6 @@ struct ComposerToolbarViewState: BindableState {
|
||||
|
||||
var keyCommands: [WysiwygKeyCommand] = []
|
||||
|
||||
var isInThread: Bool
|
||||
|
||||
var bindings: ComposerToolbarViewStateBindings
|
||||
|
||||
var isUploading: Bool {
|
||||
|
||||
@@ -46,7 +46,6 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
|
||||
|
||||
init(initialText: String? = nil,
|
||||
roomProxy: JoinedRoomProxyProtocol,
|
||||
isInThread: Bool = false,
|
||||
wysiwygViewModel: WysiwygComposerViewModel,
|
||||
completionSuggestionService: CompletionSuggestionServiceProtocol,
|
||||
mediaProvider: MediaProviderProtocol,
|
||||
@@ -69,7 +68,6 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
|
||||
audioRecorderState: .init(),
|
||||
isRoomEncrypted: roomProxy.infoPublisher.value.isEncrypted,
|
||||
isLocationSharingEnabled: appSettings.mapTilerConfiguration.isEnabled,
|
||||
isInThread: isInThread,
|
||||
bindings: .init()),
|
||||
mediaProvider: mediaProvider)
|
||||
|
||||
|
||||
@@ -40,14 +40,12 @@ struct RoomAttachmentPicker: View {
|
||||
}
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerTextFormatting)
|
||||
|
||||
if !context.viewState.isInThread {
|
||||
Button {
|
||||
context.send(viewAction: .attach(.poll))
|
||||
} label: {
|
||||
Label(L10n.screenRoomAttachmentSourcePoll, icon: \.polls)
|
||||
}
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerPoll)
|
||||
Button {
|
||||
context.send(viewAction: .attach(.poll))
|
||||
} label: {
|
||||
Label(L10n.screenRoomAttachmentSourcePoll, icon: \.polls)
|
||||
}
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerPoll)
|
||||
|
||||
if context.viewState.isLocationSharingEnabled {
|
||||
Button {
|
||||
|
||||
@@ -98,7 +98,6 @@ final class RoomScreenCoordinator: CoordinatorProtocol {
|
||||
parserStyle: .elementX)
|
||||
let composerViewModel = ComposerToolbarViewModel(initialText: parameters.sharedText,
|
||||
roomProxy: parameters.roomProxy,
|
||||
isInThread: false,
|
||||
wysiwygViewModel: wysiwygViewModel,
|
||||
completionSuggestionService: parameters.completionSuggestionService,
|
||||
mediaProvider: parameters.mediaProvider,
|
||||
|
||||
@@ -76,7 +76,6 @@ final class ThreadTimelineScreenCoordinator: CoordinatorProtocol {
|
||||
|
||||
composerViewModel = ComposerToolbarViewModel(initialText: nil,
|
||||
roomProxy: parameters.roomProxy,
|
||||
isInThread: true,
|
||||
wysiwygViewModel: wysiwygViewModel,
|
||||
completionSuggestionService: parameters.completionSuggestionService,
|
||||
mediaProvider: parameters.mediaProvider,
|
||||
|
||||
Reference in New Issue
Block a user