diff --git a/CHANGELOG.md b/CHANGELOG.md index 040bfcba..812865e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### 🐞 Fixed - Fix composer not being locked after the channel was frozen [#1015](https://github.com/GetStream/stream-chat-swiftui/pull/1015) - Fix `PollOptionAllVotesView` not updated on poll cast events [#1025](https://github.com/GetStream/stream-chat-swiftui/pull/1025) +- Fix action sheet not showing when discarding Poll creation on iOS 26 [#1027](https://github.com/GetStream/stream-chat-swiftui/pull/1027) # [4.90.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.90.0) _October 08, 2025_ diff --git a/Sources/StreamChatSwiftUI/ChatChannel/Polls/CreatePollView.swift b/Sources/StreamChatSwiftUI/ChatChannel/Polls/CreatePollView.swift index be7a180e..8064166d 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/Polls/CreatePollView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/Polls/CreatePollView.swift @@ -175,6 +175,17 @@ public struct CreatePollView: View { } label: { Text(L10n.Alert.Actions.cancel) } + .actionSheet(isPresented: $viewModel.discardConfirmationShown) { + ActionSheet( + title: Text(L10n.Composer.Polls.actionSheetDiscardTitle), + buttons: [ + .destructive(Text(L10n.Alert.Actions.discardChanges)) { + presentationMode.wrappedValue.dismiss() + }, + .default(Text(L10n.Alert.Actions.keepEditing)) + ] + ) + } } ToolbarItem(placement: .principal) { @@ -195,17 +206,6 @@ public struct CreatePollView: View { } } .navigationBarTitleDisplayMode(.inline) - .actionSheet(isPresented: $viewModel.discardConfirmationShown) { - ActionSheet( - title: Text(L10n.Composer.Polls.actionSheetDiscardTitle), - buttons: [ - .destructive(Text(L10n.Alert.Actions.discardChanges)) { - presentationMode.wrappedValue.dismiss() - }, - .cancel(Text(L10n.Alert.Actions.keepEditing)) - ] - ) - } .alert(isPresented: $viewModel.errorShown) { Alert.defaultErrorAlert }