mirror of
https://github.com/wallabag/ios-app.git
synced 2026-05-19 15:10:34 +00:00
b59b9e0408
* Bump version * Clean code (#393) * Mac os version (#395) * wip mac os version * Build on macos * WIP Webview * Update app icon Refacto routing * Move folder * Image list * Change badge update * Arrange entry view menu * Add refresh command * Add app Sandbox for macos + first build on macos * Fix #397 * Fix macos build * Try fix app icon * Rework toolbar entry * Fix logo * Add test on serverViewModel * Update refresh button * Clean file + clean Picker * Fix progress view * Fix delete entry on ipad fix #389 * Swiftformat * Add swipe to back fix #356 * enhance bottom button tap fix #400 * Add dismiss action in entry view fix #338 * Add sorting options only on id fix #71 * Add progress
20 lines
465 B
Swift
20 lines
465 B
Swift
import Combine
|
|
import Foundation
|
|
|
|
final class ErrorViewModel: ObservableObject {
|
|
private var resetAfter: Double
|
|
|
|
init(_ resetAfter: Double = 10) {
|
|
self.resetAfter = resetAfter
|
|
}
|
|
|
|
@Published private(set) var lastError: WallabagError?
|
|
|
|
func setLast(_ error: WallabagError) {
|
|
lastError = error
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + resetAfter) { [weak self] in
|
|
self?.lastError = nil
|
|
}
|
|
}
|
|
}
|