status: add settings for disabling statuses in the UI
Suggested-by: Tanel Changelog-Added: Add settings for disabling user statuses
This commit is contained in:
@@ -46,7 +46,8 @@ struct EventProfile: View {
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
EventProfileName(pubkey: pubkey, profile: profile, damus: damus_state, size: size)
|
||||
UserStatusView(status: damus_state.profiles.profile_data(pubkey).status)
|
||||
|
||||
UserStatusView(status: damus_state.profiles.profile_data(pubkey).status, show_general: damus_state.settings.show_general_statuses, show_music: damus_state.settings.show_music_statuses)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ struct EventShell<Content: View>: View {
|
||||
VStack(alignment: .leading) {
|
||||
EventTop(state: state, event: event, pubkey: pubkey, is_anon: is_anon)
|
||||
|
||||
UserStatusView(status: state.profiles.profile_data(pubkey).status)
|
||||
UserStatusView(status: state.profiles.profile_data(pubkey).status, show_general: state.settings.show_general_statuses, show_music: state.settings.show_music_statuses)
|
||||
|
||||
if !options.contains(.no_replying_to) {
|
||||
ReplyPart(events: state.events, event: event, privkey: state.keypair.privkey, profiles: state.profiles)
|
||||
@@ -97,7 +97,7 @@ struct EventShell<Content: View>: View {
|
||||
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
EventTop(state: state, event: event, pubkey: pubkey, is_anon: is_anon)
|
||||
UserStatusView(status: state.profiles.profile_data(pubkey).status)
|
||||
UserStatusView(status: state.profiles.profile_data(pubkey).status, show_general: state.settings.show_general_statuses, show_music: state.settings.show_music_statuses)
|
||||
ReplyPart(events: state.events, event: event, privkey: state.keypair.privkey, profiles: state.profiles)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,15 @@ struct AppearanceSettingsView: View {
|
||||
Toggle(NSLocalizedString("Truncate notification mention text", comment: "Setting to truncate text in mention notifications"), isOn: $settings.truncate_mention_text)
|
||||
.toggleStyle(.switch)
|
||||
}
|
||||
|
||||
|
||||
Section(header: Text("User Statuses")) {
|
||||
Toggle(NSLocalizedString("Show general statuses", comment: "Settings toggle for enabling general user statuses"), isOn: $settings.show_general_statuses)
|
||||
.toggleStyle(.switch)
|
||||
|
||||
Toggle(NSLocalizedString("Show music statuses", comment: "Settings toggle for enabling now playing music statuses"), isOn: $settings.show_music_statuses)
|
||||
.toggleStyle(.switch)
|
||||
}
|
||||
|
||||
// MARK: - Accessibility
|
||||
Section(header: Text(NSLocalizedString("Accessibility", comment: "Section header for accessibility settings"))) {
|
||||
Toggle(NSLocalizedString("Left Handed", comment: "Moves the post button to the left side of the screen"), isOn: $settings.left_handed)
|
||||
|
||||
@@ -112,7 +112,7 @@ struct SideMenuView: View {
|
||||
present_sheet(.user_status)
|
||||
}
|
||||
|
||||
UserStatusView(status: damus_state.profiles.profile_data(damus_state.pubkey).status)
|
||||
UserStatusView(status: damus_state.profiles.profile_data(damus_state.pubkey).status, show_general: true, show_music: true)
|
||||
.dynamicTypeSize(.xSmall)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user