mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-22 15:16:36 +00:00
Support server side default post visibility
This commit is contained in:
parent
dc223171b3
commit
2961793e87
4 changed files with 10 additions and 4 deletions
|
@ -7,6 +7,7 @@ import Env
|
|||
import Network
|
||||
|
||||
struct ExploreTab: View {
|
||||
@EnvironmentObject private var preferences: UserPreferences
|
||||
@EnvironmentObject private var currentAccount: CurrentAccount
|
||||
@EnvironmentObject private var client: Client
|
||||
@StateObject private var routeurPath = RouterPath()
|
||||
|
@ -18,7 +19,8 @@ struct ExploreTab: View {
|
|||
.withAppRouteur()
|
||||
.withSheetDestinations(sheetDestinations: $routeurPath.presentedSheet)
|
||||
.toolbar {
|
||||
statusEditorToolbarItem(routeurPath: routeurPath, visibility: .pub)
|
||||
statusEditorToolbarItem(routeurPath: routeurPath,
|
||||
visibility: preferences.serverPreferences?.postVisibility ?? .pub)
|
||||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
AppAccountsSelectorView(routeurPath: routeurPath)
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@ struct NotificationsTab: View {
|
|||
.withAppRouteur()
|
||||
.withSheetDestinations(sheetDestinations: $routeurPath.presentedSheet)
|
||||
.toolbar {
|
||||
statusEditorToolbarItem(routeurPath: routeurPath, visibility: .pub)
|
||||
statusEditorToolbarItem(routeurPath: routeurPath,
|
||||
visibility: userPreferences.serverPreferences?.postVisibility ?? .pub)
|
||||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
AppAccountsSelectorView(routeurPath: routeurPath)
|
||||
}
|
||||
|
|
|
@ -127,7 +127,8 @@ struct TimelineTab: View {
|
|||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
AppAccountsSelectorView(routeurPath: routeurPath)
|
||||
}
|
||||
statusEditorToolbarItem(routeurPath: routeurPath, visibility: .pub)
|
||||
statusEditorToolbarItem(routeurPath: routeurPath,
|
||||
visibility: preferences.serverPreferences?.postVisibility ?? .pub)
|
||||
} else {
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
addAccountButton
|
||||
|
|
|
@ -10,6 +10,7 @@ public struct AccountDetailView: View {
|
|||
@Environment(\.redactionReasons) private var reasons
|
||||
@EnvironmentObject private var watcher: StreamWatcher
|
||||
@EnvironmentObject private var currentAccount: CurrentAccount
|
||||
@EnvironmentObject private var preferences: UserPreferences
|
||||
@EnvironmentObject private var theme: Theme
|
||||
@EnvironmentObject private var client: Client
|
||||
@EnvironmentObject private var routeurPath: RouterPath
|
||||
|
@ -334,7 +335,8 @@ public struct AccountDetailView: View {
|
|||
Section(account.acct) {
|
||||
if !viewModel.isCurrentUser {
|
||||
Button {
|
||||
routeurPath.presentedSheet = .mentionStatusEditor(account: account, visibility: .pub)
|
||||
routeurPath.presentedSheet = .mentionStatusEditor(account: account,
|
||||
visibility: preferences.serverPreferences?.postVisibility ?? .pub)
|
||||
} label: {
|
||||
Label("Mention", systemImage: "at")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue