Remember last used trending category and country

This commit is contained in:
Arkadiusz Fal
2021-09-27 00:19:50 +02:00
parent c4674c06a4
commit 994f1f9215
5 changed files with 14 additions and 8 deletions

View File

@@ -1,11 +1,13 @@
import Defaults
import Siesta
import SwiftUI
struct TrendingView: View {
@StateObject private var store = Store<[Video]>()
@State private var category: TrendingCategory = .default
@State private var country: Country! = .pl
@Default(.trendingCategory) private var category
@Default(.trendingCountry) private var country
@State private var presentingCountrySelection = false
@EnvironmentObject<InvidiousAPI> private var api