tom-anders / Easy_xkcd

An easy and simple open source xkcd reader
Apache License 2.0
164 stars 41 forks source link

Add confirmation for "Mark all as read" #342

Open danjl1100 opened 7 months ago

danjl1100 commented 7 months ago

First of all, excellent app! It does exactly what it needs to, and nothing more.

Recently, I had been using the "Earliest unread" menu option to go through the backlog of content I hadn't seen yet. Workflow: just clicking "Earliest unread", laugh, back to overview list, rinse and repeat.

However, by chance I accidentally hit "Mark all as read" instead of "Earliest unread" once, and the game was up.

I'm running version 8.4.

Let me know how this suggestion sounds to you. I've done a tiny bit of Android development, but it's been a while so I'd need to get up to date for the best way to add this.

Thank you, Daniel

tom-anders commented 7 months ago

Hi!

Adding this shouldn't be too hard and definitely sounds like a very good idea.

If you want to take a shot at this, here's the line that triggers "mark all as read": https://github.com/tom-anders/Easy_xkcd/blob/368b988c713d55ba496cc993faabc4d30b37d8ea/app/src/main/java/de/tap/easy_xkcd/comicOverview/ComicOverviewFragment.kt#L275

You'll want to add an AlertDialog at this place (take a look at a few lines before this for an example).

Let me know if you need more help or have any questions!

Tom

danjl1100 commented 5 months ago

Thank you for the pointer! I'll pick this up (finally found time) and will let you know if I get stuck.

Wusii commented 4 months ago

It just happend to me that I tapped on "delete favorites" (in the overflow menu in the favorites browser), and there too I would have liked a confirmation dialog before all my favorites got deleted. Maybe, this change can be applied there, too..?