Ferrite-backup/Ferrite/ViewModels/NavigationViewModel.swift
kingbri ff23a854ef Sources: Add source updating and source list edits
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>
2022-08-31 00:41:38 -04:00

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?
}