Hide canceling explorer tasks
Browse files- frontend/app.js +1 -1
frontend/app.js
CHANGED
|
@@ -202,7 +202,7 @@ async function loadSearches(page = 1, silent = false) {
|
|
| 202 |
const [searchResp, taskResp] = await Promise.all([fetch(`/api/searches?page=${page}`), fetch("/api/progress")])
|
| 203 |
const data = await searchResp.json()
|
| 204 |
const tasks = await taskResp.json()
|
| 205 |
-
const active = tasks.filter(t => t.type === "search" || t.type === "search+scan" || t.type === "scan" || t.type === "user_search" || t.type === "reclass")
|
| 206 |
const activeIds = new Set(active.map(t => t.id))
|
| 207 |
const searches = (data.items || []).filter(s => (s.kind === "reclass" || (s.found_exif || 0) > 0) && !activeIds.has(s.id))
|
| 208 |
if (!searches.length && !active.length) {
|
|
|
|
| 202 |
const [searchResp, taskResp] = await Promise.all([fetch(`/api/searches?page=${page}`), fetch("/api/progress")])
|
| 203 |
const data = await searchResp.json()
|
| 204 |
const tasks = await taskResp.json()
|
| 205 |
+
const active = tasks.filter(t => t.phase !== "canceling" && (t.type === "search" || t.type === "search+scan" || t.type === "scan" || t.type === "user_search" || t.type === "reclass"))
|
| 206 |
const activeIds = new Set(active.map(t => t.id))
|
| 207 |
const searches = (data.items || []).filter(s => (s.kind === "reclass" || (s.found_exif || 0) > 0) && !activeIds.has(s.id))
|
| 208 |
if (!searches.length && !active.length) {
|