mirror of
https://github.com/NinjaCheetah/RIT-Dining.git
synced 2026-03-04 21:25:27 -05:00
Started work on refactors
- The favorites model now lives inside of the base dining model, since it was only ever used in places where the main dining model was also available and is only relevant when the dining model is available. - Removed unnecessary instances of models that were going unused. - Moved the favorite/map/menu buttons in the top right of the DetailView into the right side toolbar. - This frees up a good bit of space at the top of the DetailView and looks cleaner, especially with iOS 26's new toolbar style. - Actually added a copyright string to the about screen. More refactors, both internally and for the UI, will be coming soon.
This commit is contained in:
@@ -11,14 +11,12 @@ struct ContentView: View {
|
||||
// Save sort/filter options in AppStorage so that they actually get saved.
|
||||
@AppStorage("openLocationsOnly") var openLocationsOnly: Bool = false
|
||||
@AppStorage("openLocationsFirst") var openLocationsFirst: Bool = false
|
||||
@State private var favorites = Favorites()
|
||||
@State private var notifyingChefs = NotifyingChefs()
|
||||
|
||||
@State private var model = DiningModel()
|
||||
@State private var isLoading: Bool = true
|
||||
@State private var loadFailed: Bool = false
|
||||
@State private var showingDonationSheet: Bool = false
|
||||
@State private var rotationDegrees: Double = 0
|
||||
@State private var diningLocations: [DiningLocation] = []
|
||||
@State private var searchText: String = ""
|
||||
|
||||
private var animation: Animation {
|
||||
@@ -176,8 +174,6 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.environment(favorites)
|
||||
.environment(notifyingChefs)
|
||||
.environment(model)
|
||||
.task {
|
||||
await getDiningData()
|
||||
|
||||
Reference in New Issue
Block a user