IceCubesApp/Packages/Account/Sources/Account/Tags/FollowedTagsListView.swift
Thomas Ricouard 1f858414d8 format .
2024-02-14 12:48:14 +01:00

35 lines
835 B
Swift

import DesignSystem
import Env
import Models
import SwiftUI
public struct FollowedTagsListView: View {
@Environment(CurrentAccount.self) private var currentAccount
@Environment(Theme.self) private var theme
public init() {}
public var body: some View {
List(currentAccount.tags) { tag in
TagRowView(tag: tag)
#if !os(visionOS)
.listRowBackground(theme.primaryBackgroundColor)
#endif
.padding(.vertical, 4)
}
.task {
await currentAccount.fetchFollowedTags()
}
.refreshable {
await currentAccount.fetchFollowedTags()
}
#if !os(visionOS)
.scrollContentBackground(.hidden)
.background(theme.secondaryBackgroundColor)
#endif
.listStyle(.plain)
.navigationTitle("timeline.filter.tags")
.navigationBarTitleDisplayMode(.inline)
}
}