summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorjacquarg <guillaume.jacquart@hoodbrains.com>2021-11-15 16:12:41 +0100
committerjacquarg <guillaume.jacquart@hoodbrains.com>2021-11-15 16:12:41 +0100
commita396171472b0cd59455dcd13134ba2250b7c165c (patch)
treeae3822ceadf31df78570a48ba51e4d441b7f9b9f /app
parent38a056495a7f6a85e57b0db62e8e350a22ef0148 (diff)
Fix call all whitelisted tracker on enter apptrackers screen
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/AppTrackersFragment.kt4
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/ToggleTrackersAdapter.kt4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/AppTrackersFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/AppTrackersFragment.kt
index 2fab8cf..4ccdc59 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/AppTrackersFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/AppTrackersFragment.kt
@@ -93,8 +93,8 @@ class AppTrackersFragment :
binding = ApptrackersFragmentBinding.bind(view)
// TODO: crash sqlite ?
- // binding.blockAllToggle.setOnCheckedChangeListener { _, isChecked ->
- // viewModel.submitAction(Action.BlockAllToggleAction(isChecked))
+ // binding.blockAllToggle.setOnClickListener {
+ // viewModel.submitAction(Action.BlockAllToggleAction(binding.blockAllToggle.isChecked))
// }
binding.trackers.apply {
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/ToggleTrackersAdapter.kt b/app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/ToggleTrackersAdapter.kt
index b1b3ed6..95ea094 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/ToggleTrackersAdapter.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/trackers/apptrackers/ToggleTrackersAdapter.kt
@@ -58,8 +58,8 @@ class ToggleTrackersAdapter(
val view = LayoutInflater.from(parent.context)
.inflate(itemsLayout, parent, false)
val holder = ViewHolder(view)
- holder.toggle.setOnCheckedChangeListener { _, isChecked ->
- listener(dataSet[holder.adapterPosition].first, isChecked)
+ holder.toggle.setOnClickListener {
+ listener(dataSet[holder.adapterPosition].first, holder.toggle.isChecked)
}
return holder
}