fix: 切换/删除账号时清空视频缓存,防止看到已删除账号的视频
CI / lint-and-build (push) Has been cancelled

This commit is contained in:
2026-06-30 14:14:25 +06:00
parent c7b539f2c5
commit 05b247bed6
@@ -1,6 +1,7 @@
import SwiftUI
struct VideoListView: View {
@EnvironmentObject var accountStore: AccountStore
@State private var allVideos: [VideoItem] = []
@State private var filteredVideos: [VideoItem] = []
@State private var displayVideos: [VideoItem] = []
@@ -210,6 +211,14 @@ struct VideoListView: View {
await refreshFromAPI()
}
}
.onChange(of: accountStore.activeAccount?.id) { _, newId in
allVideos = []
filteredVideos = []
displayVideos = []
selectedVideos = []
errorMessage = nil
Task { await refreshFromAPI() }
}
.sheet(isPresented: $showDownloadPanel) {
DownloadPanelView(items: downloadResults)
}