From 31baff277213d90c560959ad9e1879979703f15a Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Tue, 24 Mar 2020 21:02:47 +0100 Subject: [PATCH] Fix feed notification switch enabled on item view click with account notifications disabled --- .../com/readrops/app/adapters/NotificationPermissionAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/readrops/app/adapters/NotificationPermissionAdapter.kt b/app/src/main/java/com/readrops/app/adapters/NotificationPermissionAdapter.kt index 14795c40..cab66866 100644 --- a/app/src/main/java/com/readrops/app/adapters/NotificationPermissionAdapter.kt +++ b/app/src/main/java/com/readrops/app/adapters/NotificationPermissionAdapter.kt @@ -29,7 +29,7 @@ class NotificationPermissionAdapter(var enableAll: Boolean, val listener: (feed: holder.binding.notificationSwitch.isEnabled = enableAll holder.binding.notificationSwitch.setOnCheckedChangeListener { _, _ -> listener(feed) } - holder.itemView.setOnClickListener { listener(feed) } + holder.itemView.setOnClickListener { if (enableAll) listener(feed) } GlideApp.with(holder.itemView.context) .load(feed.iconUrl)