Expose alert rule outcomes

This commit is contained in:
ajp_anton
2026-08-18 16:19:29 +00:00
parent bd727eaec0
commit 8b66456d8c
4 changed files with 55 additions and 17 deletions
@@ -53,10 +53,6 @@ class AppRulesFragment : Fragment(R.layout.fragment_app_rules) {
private fun edit(existing: AlertRule?) {
val configuration = store.load()
if (configuration.profiles.isEmpty()) {
android.widget.Toast.makeText(requireContext(), "Create a profile first", android.widget.Toast.LENGTH_LONG).show()
return
}
AlertRuleDialog.show(requireContext(), configuration, existing,
onSave = { _, definition ->
store.save(if (existing == null) AlertRuleEditor.addForApps(configuration, listOf(packageName), definition) else AlertRuleEditor.updateForApp(configuration, existing.id, definition))