Sources can now be updated based on the repo ID. To preserve repo IDs across single URL links, the source lists can be edited and the ID is transferred over. Signed-off-by: kingbri <bdashore3@gmail.com>
29 lines
674 B
Swift
29 lines
674 B
Swift
//
|
|
// NavigationViewModel.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 7/24/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
class NavigationViewModel: ObservableObject {
|
|
// Used between SearchResultsView and MagnetChoiceView
|
|
enum ChoiceSheetType: Identifiable {
|
|
var id: Int {
|
|
hashValue
|
|
}
|
|
|
|
case magnet
|
|
case batch
|
|
}
|
|
|
|
@Published var currentChoiceSheet: ChoiceSheetType?
|
|
|
|
// Used between SourceListView and SourceSettingsView
|
|
@Published var showSourceSettings: Bool = false
|
|
@Published var selectedSource: Source?
|
|
|
|
@Published var showSourceListEditor: Bool = false
|
|
@Published var selectedSourceList: SourceList?
|
|
}
|