#73 Publish status without text message

This commit is contained in:
Marcin Czachurski 2023-10-22 13:19:01 +02:00
parent a510d0d0c2
commit 9d90622ff2
2 changed files with 6 additions and 10 deletions

View File

@ -46,9 +46,5 @@ From time to time you have to come back and translate lines which has been added
Things that should be implemented in version 2.0:
- [ ] Use auto generated resources (Color/Images) instead static extensions (how to do this in separete Swift Packages?)
- [x] Move to xcstring (new Xcode transaction system)
- [x] Move to new Observable macro (iOS 17)
- [x] Migrate to SwiftData (iOS 17)
- [ ] Use ViewModels
- [x] Add tips (new TipKit framework in iOS 17)
- [ ] Use ViewModels?
- [ ] Enable swiftlint (https://github.com/realm/SwiftLint/issues/5053)

View File

@ -581,11 +581,6 @@ public struct BaseComposeView: View {
}
private func isPublishButtonDisabled() -> Bool {
// Publish always disabled when there is not status text.
if self.textModel.text.string.isEmpty {
return true
}
// When application is during uploading photos we cannot send new status.
if self.photosAreUploading == true {
return true
@ -595,6 +590,11 @@ public struct BaseComposeView: View {
if self.statusViewModel == nil && self.photosAttachment.hasUploadedPhotos() == false {
return true
}
// When status is a comment, then text is required.
if self.statusViewModel != nil && self.textModel.text.string.isEmpty {
return true
}
return false
}