clean-checkpoint-1

This commit is contained in:
Magesh K
2024-12-07 17:45:09 +05:30
parent e27c5f0b87
commit 63a3203e50
95 changed files with 1040 additions and 3761 deletions

View File

@@ -16,10 +16,13 @@ extension TimeInterval
static let longToastViewDuration = 8.0
}
final class ToastView: RSTToastView
extension ToastView
{
static let openErrorLogNotification = Notification.Name("ALTOpenErrorLogNotification")
}
class ToastView: RSTToastView
{
var preferredDuration: TimeInterval
var opensErrorLog: Bool = false
@@ -72,6 +75,7 @@ final class ToastView: RSTToastView
error.domain == AltServerErrorDomain && error.code == ALTServerError.Code.underlyingError.rawValue
{
// Treat underlyingError as the primary error, but keep localized title + failure.
let nsError = error as NSError
error = unwrappedUnderlyingError as NSError
@@ -138,12 +142,6 @@ final class ToastView: RSTToastView
{
self.show(in: view, duration: self.preferredDuration)
}
@objc
func showErrorLog() {
guard self.opensErrorLog else { return }
NotificationCenter.default.post(name: ToastView.openErrorLogNotification, object: self)
}
}
private extension ToastView