Polish: suppress error banner for transient sync failures and sort remote folders
Only show the error banner for non-transient sync failures; connectivity issues (timeout, refused, unreachable) just update the status dot. Sort workspace entries above regular folders in the remote folder browser.
This commit is contained in:
parent
fbf1ba69ef
commit
7cc899470f
|
|
@ -106,12 +106,14 @@
|
|||
browseLoading = true;
|
||||
browseError = null;
|
||||
try {
|
||||
browseEntries = await invoke("list_remote_folder", {
|
||||
const entries: typeof browseEntries = await invoke("list_remote_folder", {
|
||||
url: webdavUrl,
|
||||
username: webdavUser,
|
||||
password: webdavPass,
|
||||
path: currentBrowsePath,
|
||||
});
|
||||
entries.sort((a, b) => (a.is_workspace === b.is_workspace ? 0 : a.is_workspace ? -1 : 1));
|
||||
browseEntries = entries;
|
||||
} catch (e) {
|
||||
browseError = String(e);
|
||||
browseEntries = [];
|
||||
|
|
|
|||
|
|
@ -184,7 +184,14 @@ async function loadLists() {
|
|||
async function loadTasks() {
|
||||
if (!activeListId) return;
|
||||
try {
|
||||
tasks = await invoke<Task[]>("list_tasks", { listId: activeListId });
|
||||
const loaded = await invoke<Task[]>("list_tasks", { listId: activeListId });
|
||||
// Deduplicate by task ID — sync conflicts can produce files with the same UUID
|
||||
const seen = new Set<string>();
|
||||
tasks = loaded.filter((t) => {
|
||||
if (seen.has(t.id)) return false;
|
||||
seen.add(t.id);
|
||||
return true;
|
||||
});
|
||||
} catch (e) {
|
||||
error = String(e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue