Add tag overview, improve assets
This commit is contained in:
@ -73,16 +73,30 @@ struct FileListView: View {
|
||||
guard oldValue != newValue else {
|
||||
return
|
||||
}
|
||||
if let selectedFile,
|
||||
newValue.matches(selectedFile.type) {
|
||||
let newFile = filteredFiles.first
|
||||
|
||||
guard let selectedFile else {
|
||||
if let newFile {
|
||||
DispatchQueue.main.async {
|
||||
selectedFile = newFile
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
selectedFile = filteredFiles.first
|
||||
|
||||
if newValue.matches(selectedFile.type) {
|
||||
return
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
self.selectedFile = newFile
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
if selectedFile == nil {
|
||||
selectedFile = content.files.first
|
||||
DispatchQueue.main.async {
|
||||
selectedFile = content.files.first
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user