mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +00:00
Convert Manage Channel Notifications list to macOS-native helpers
This commit is contained in:
@@ -165,14 +165,14 @@ struct ManageChannelNotificationsView: View {
|
|||||||
private var subscriptionService: SubscriptionService? { appEnvironment?.subscriptionService }
|
private var subscriptionService: SubscriptionService? { appEnvironment?.subscriptionService }
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List {
|
Group {
|
||||||
if isLoading {
|
if isLoading {
|
||||||
HStack {
|
HStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
ProgressView()
|
ProgressView()
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.listRowBackground(Color.clear)
|
.frame(maxHeight: .infinity)
|
||||||
} else if let errorMessage {
|
} else if let errorMessage {
|
||||||
ContentUnavailableView {
|
ContentUnavailableView {
|
||||||
Label(
|
Label(
|
||||||
@@ -194,10 +194,14 @@ struct ManageChannelNotificationsView: View {
|
|||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
} else {
|
} else {
|
||||||
ForEach(subscriptions, id: \.channelID) { subscription in
|
SettingsFormContainer {
|
||||||
ChannelNotificationToggle(subscription: subscription)
|
SettingsFormSection {
|
||||||
|
ForEach(subscriptions, id: \.channelID) { subscription in
|
||||||
|
ChannelNotificationToggle(subscription: subscription)
|
||||||
|
}
|
||||||
|
.id(refreshID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.id(refreshID)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationTitle(String(localized: "settings.notifications.manageChannels.title"))
|
.navigationTitle(String(localized: "settings.notifications.manageChannels.title"))
|
||||||
|
|||||||
Reference in New Issue
Block a user