mirror of
https://github.com/yattee/yattee.git
synced 2026-11-05 19:37:19 +00:00
Show player toasts and drop the unused instance status
PlayerService's toast manager was never set, so stream refresh, missing download and skip-to-next toasts were silently dropped. Wire it up in AppEnvironment. InstancesManager's per-instance status was never written since the v2 rewrite; account statuses already cover rejected and missing credentials in the sources list, so remove it along with its unreachable row branch.
This commit is contained in:
@@ -415,11 +415,8 @@ struct SourcesListView: View {
|
||||
appEnvironment?.needsCredentials(for: instance) ?? false
|
||||
}
|
||||
|
||||
/// Whether one of this source's logins is being refused by the server.
|
||||
///
|
||||
/// The instance-level statuses below know nothing about accounts, so a
|
||||
/// rejected login would otherwise show up nowhere the user looks for their
|
||||
/// sources.
|
||||
/// Whether one of this source's logins is being refused by the server, so a
|
||||
/// rejected login shows up where the user looks for their sources.
|
||||
private func hasRejectedAccount(_ instance: Instance) -> Bool {
|
||||
guard let accountsManager = appEnvironment?.accountsManager else { return false }
|
||||
|
||||
@@ -443,19 +440,6 @@ struct SourcesListView: View {
|
||||
Label(String(localized: "sources.status.authRequired"), systemImage: "key.fill")
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.orange)
|
||||
} else if let status = instancesManager?.status(for: instance) {
|
||||
switch status {
|
||||
case .authFailed:
|
||||
Label(String(localized: "sources.status.authFailed"), systemImage: "exclamationmark.triangle.fill")
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.orange)
|
||||
case .authRequired:
|
||||
Label(String(localized: "sources.status.authRequired"), systemImage: "key.fill")
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.orange)
|
||||
default:
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user