Adjusted how to hide the voting screen (#1054)

Like other submission item selection screens, the voting screen can now be shown/hidden with a button toggle.

Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
This commit is contained in:
Yusuke Arakawa 2023-02-26 02:28:27 +09:00 committed by GitHub
parent d82453c513
commit f1db2f716d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ struct StatusEditorAccessoryView: View {
Button {
withAnimation {
viewModel.showPoll.toggle()
viewModel.resetPollDefaults()
}
} label: {
Image(systemName: "chart.bar")

View File

@ -99,7 +99,7 @@ public class StatusEditorViewModel: NSObject, ObservableObject {
}
var shouldDisablePollButton: Bool {
showPoll || !selectedMedias.isEmpty
!selectedMedias.isEmpty
}
var shouldDisplayDismissWarning: Bool {