Skip to content

Commit

Permalink
Default values for quick post draft
Browse files Browse the repository at this point in the history
  • Loading branch information
livid committed Apr 24, 2024
1 parent b1d696b commit 8b8f780
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Planet/Labs/Quick Post/QuickPostView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ struct QuickPostView: View {
} label: {
Text("Post")
}.keyboardShortcut(.defaultAction)
.keyboardShortcut("d", modifiers: [.command, .shift])
.buttonStyle(.borderedProminent)
.buttonBorderShape(.roundedRectangle)
}.padding(10)
Expand All @@ -80,6 +81,9 @@ struct QuickPostView: View {
summary: nil,
planet: planet
)
article.attachments = []
// TODO: Support tags in Quick Post
article.tags = [:]
var articles = planet.articles
articles?.append(article)
articles?.sort(by: { MyArticleModel.reorder(a: $0, b: $1) })
Expand Down
4 changes: 3 additions & 1 deletion Planet/Quick Share/PlanetQuickShareView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ struct PlanetQuickShareView: View {
} label: {
Text("Post")
}
.keyboardShortcut(.return, modifiers: [])
.keyboardShortcut(.defaultAction)
.keyboardShortcut("d", modifiers: [.command, .shift])
.keyboardShortcut(.return, modifiers: [.command])
.keyboardShortcut(.end, modifiers: [])
.disabled(isPosting || viewModel.getTargetPlanet() == nil)
}
Expand Down
2 changes: 1 addition & 1 deletion Planet/versioning.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 1982
CURRENT_PROJECT_VERSION = 1983

0 comments on commit 8b8f780

Please sign in to comment.