mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 10:11:00 +00:00
Forward status visibility to the editor for reply / edit + prevent quote on non public status
This commit is contained in:
parent
5d86935e5d
commit
d5f4462f3e
3 changed files with 10 additions and 5 deletions
|
@ -114,6 +114,7 @@ public class StatusEditorViewModel: ObservableObject {
|
|||
}
|
||||
mentionString += " "
|
||||
replyToStatus = status
|
||||
visibility = status.visibility
|
||||
statusText = .init(string: mentionString)
|
||||
selectedRange = .init(location: mentionString.utf16.count, length: 0)
|
||||
case let .edit(status):
|
||||
|
@ -121,6 +122,7 @@ public class StatusEditorViewModel: ObservableObject {
|
|||
selectedRange = .init(location: statusText.string.utf16.count, length: 0)
|
||||
spoilerOn = !status.spoilerText.isEmpty
|
||||
spoilerText = status.spoilerText
|
||||
visibility = status.visibility
|
||||
mediasImages = status.mediaAttachments.map{ .init(image: nil, mediaAttachement: $0, error: nil )}
|
||||
case let .quote(status):
|
||||
self.embededStatus = status
|
||||
|
|
|
@ -238,10 +238,13 @@ public struct StatusRowView: View {
|
|||
} } label: {
|
||||
Label(viewModel.isReblogged ? "Unboost" : "Boost", systemImage: "arrow.left.arrow.right.circle")
|
||||
}
|
||||
Button {
|
||||
routeurPath.presentedSheet = .quoteStatusEditor(status: viewModel.status)
|
||||
} label: {
|
||||
Label("Quote this post", systemImage: "quote.bubble")
|
||||
|
||||
if viewModel.status.visibility == .pub {
|
||||
Button {
|
||||
routeurPath.presentedSheet = .quoteStatusEditor(status: viewModel.status)
|
||||
} label: {
|
||||
Label("Quote this post", systemImage: "quote.bubble")
|
||||
}
|
||||
}
|
||||
|
||||
if let url = viewModel.status.reblog?.url ?? viewModel.status.url {
|
||||
|
|
|
@ -36,7 +36,7 @@ For contributors and myself, here is a todo list of features that could be added
|
|||
- [ ] Edit filters.
|
||||
- [X] Open remote status locally
|
||||
- [ ] More context menu everywhere
|
||||
- [ ] Support pinned posts
|
||||
- [X] Support pinned posts
|
||||
- [ ] Support IceCubesApp://any mastodon links
|
||||
- [ ] Add a share sheet
|
||||
- [ ] Translate button
|
||||
|
|
Loading…
Reference in a new issue