fix(customisation-sync): hide identical items with "Hide not applicable items"

The checkbox only toggled a CSS class for rows labelled "All the same or
non-existent", while `hideNotApplicable`, which filters the offered
devices by whether their copy can be applied, was hard-coded to false.
Items present on another device therefore stayed visible even when every
copy was the same.

Drive `hideNotApplicable` from the checkbox, so the comparison only runs
while it is on, and pass it to the reactive update so toggling it
re-evaluates the rows. The term selection moves into PluginTerms.ts so it
can be unit-tested.

Fixes #1193
This commit is contained in:
Immick committed 2026-09-15 22:03:51 +03:00
1 parent ba297d1233
commit f1746fa4b8
4 files changed
+102 -18

No files matched your search

+2 -1
View File
@@ -32,7 +32,8 @@
export let core :LiveSyncBaseCore;
// $: core = plugin.core;
$: hideNotApplicable = false;
// Comparing every copy is only worth it while the user asks to hide the unchanged ones.
$: hideNotApplicable = hideEven;
$: thisTerm = core.services.setting.getDeviceAndVaultName();
const addOn = core.getAddOn<ConfigSync>(ConfigSync.name)!;