mirror of
https://github.com/gezimos/inkOS.git
synced 2026-05-19 11:34:30 -04:00
AllowList fixed
This commit is contained in:
@@ -496,6 +496,26 @@ class NotificationSettingsFragment : Fragment() {
|
||||
!pkg.startsWith("com.inkos.internal.") &&
|
||||
!pkg.startsWith("com.inkos.system.")
|
||||
}
|
||||
// If caller requested hidden apps but the prefs indicate there are hidden
|
||||
// apps and the current emission does not contain any of them, then
|
||||
// this emission is stale (likely a pre-request cache). Wait for the
|
||||
// next emission instead of showing an incomplete dialog.
|
||||
try {
|
||||
if (includeHidden) {
|
||||
val hiddenSet = prefs.hiddenApps
|
||||
if (hiddenSet.isNotEmpty()) {
|
||||
// Check if any filteredApps correspond to a hidden entry
|
||||
val containsHidden = filteredApps.any { item ->
|
||||
val key = "${item.activityPackage}|${item.user}"
|
||||
hiddenSet.contains(key) || hiddenSet.contains(item.activityPackage)
|
||||
}
|
||||
if (!containsHidden) {
|
||||
// Skip this emission and wait for the updated list
|
||||
return@observe
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (_: Exception) {}
|
||||
val allApps = filteredApps.map {
|
||||
AppInfo(
|
||||
label = it.customLabel.takeIf { l -> !l.isNullOrEmpty() } ?: it.activityLabel,
|
||||
|
||||
Reference in New Issue
Block a user