jerboa icon indicating copy to clipboard operation
jerboa copied to clipboard

Enable swiping on comments to go back to posts

Open CharlieGitDB opened this issue 2 years ago • 2 comments

The Reddit clients I have always used on Android were Slide, Sync, Infinity, all of these by default support swiping left to right on a Post to go backwards. I have made code changes to make this possible on the comments to go back to the post view.

Closes #431

(Sorry for the laggy recording)

swipebacklemmypr.webm

CharlieGitDB avatar Jun 21 '23 03:06 CharlieGitDB

This should be enabled by default, honestly I don't even know if it needs an option. Do other apps offer this option?

Fair enough. I wanted it to be less invasive as a first PR from me. As you said though I don't think there is any app that has it as an option. I will remove.

The animation for this when I tested it in the emulator seems to be fade-out/fade-in. Other apps have a finger tracking animation. That's what I imagined in https://github.com/dessalines/jerboa/issues/431. I'm not opposed to this since this is still an improvement, but I'd leave the original issue open until we can do a finger-tracking animation.

I'll see if I can make this happen tonight. I have not done much modern Android dev at all, I am primarily a web dev so I may not have the skills for this, but ill take a crack at it.

CharlieGitDB avatar Jun 21 '23 11:06 CharlieGitDB

@twizmwazin Alright I have updated it to have finger tracking animation. It would be nice to have the swipe background be the previous Activity & not be black, but I don't really know how I could make that happen. I could probably change it to be the users background theme color though if we want.

swipetodismiss.webm

CharlieGitDB avatar Jun 21 '23 15:06 CharlieGitDB

Yeah, MaterialTheme.colors.background would be a better choice over black. Still would like to have it show the previous view underneath but that can be a separate issue since this is a good improvement as-is.

twizmwazin avatar Jun 21 '23 18:06 twizmwazin

Alright I updated it to use MaterialTheme.colorScheme.background on swipe.

As for not having it be a solid color and be the HomeActivity I will probably need to add it to some app drawer or something? I don't know yet I would need to spend more time on it. Which I don't think I will get to for a couple days minimum.

Edit:

can be a separate issue since this is a good improvement as-is.

sounds good I will circle back to this to improve it another time

CharlieGitDB avatar Jun 21 '23 18:06 CharlieGitDB

Themed swipe back

themedswipeback.webm

CharlieGitDB avatar Jun 22 '23 01:06 CharlieGitDB