fix(lsposed): show user-app hidden count in save snackbar (#88)

The post-save snackbar was reading hiddenPkgs.size, but hiddenPkgs has
selfPkg appended unconditionally (so the kernel-side list always
contains vpnhide itself), so the displayed count was always one higher
than what the user actually selected.

Switch to the same hiddenCount/observerCount values the screen header
already uses (allApps.count { it.hidden / it.observer }) so both
counters stay in sync and don't drift if the hiddenPkgs assembly logic
changes again.

Closes #79.
This commit is contained in:
Danila Gornushko 2026-04-25 20:34:24 +03:00 committed by GitHub
parent 06640d9b16
commit 41342e51e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,9 @@
_2026-04-25_
## English
Save snackbar on the App Hiding screen no longer counts vpnhide itself in the hidden total.
## Русский
Snackbar после сохранения на экране скрытия приложений больше не учитывает сам vpnhide в счётчике скрытых.

View file

@ -341,7 +341,7 @@ fun AppHidingScreen(
suExecAsync(buildHidingSaveCommand(header, hiddenPkgs, observerPkgs))
if (exitCode == 0) {
snackMessage =
context.getString(R.string.hiding_save_success, hiddenPkgs.size, observerPkgs.size)
context.getString(R.string.hiding_save_success, hiddenCount, observerCount)
DashboardCache.invalidate()
TargetsCache.refresh(scope, context)
} else if (exitCode == -1) {