restores Helder in all its glory
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import Foundation
|
||||
import HelderCore
|
||||
import HelderServices
|
||||
|
||||
/// The per-project recent-files list.
|
||||
final class FakeRecentFiles: RecentFilesStoring, @unchecked Sendable {
|
||||
private let state: Locked<[String]>
|
||||
|
||||
init(_ paths: [String] = []) {
|
||||
state = Locked(paths)
|
||||
}
|
||||
|
||||
var paths: [String] { state.current }
|
||||
|
||||
func load() async -> [String] { state.current }
|
||||
func save(_ paths: [String]) async { state.mutate { $0 = paths } }
|
||||
}
|
||||
Reference in New Issue
Block a user