Skip to content

Instantly share code, notes, and snippets.

@tablacus
Last active June 5, 2021 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tablacus/a4493d3c0b4e5f87e3da72e66ec0950b to your computer and use it in GitHub Desktop.
Save tablacus/a4493d3c0b4e5f87e3da72e66ec0950b to your computer and use it in GitHub Desktop.
Decrement badges - Tablacus Explorer
const Selected = GetSelectedArray(Ctrl, pt, true).shift();
if (Selected && Selected.Count) {
for (let i = Selected.Count; i-- > 0;) {
const path = Selected.Item(i).Path;
const s = GetNum(Sync.Badge.DB.Get(path)) - 1;
if (s >= 0) {
Sync.Badge.Set(path, s);
}
}
}
@tablacus
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment