Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable swiping on comments to go back to posts #785

Merged
merged 30 commits into from
Jun 22, 2023

Conversation

CharlieGitDB
Copy link
Contributor

@CharlieGitDB CharlieGitDB commented Jun 21, 2023

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

Copy link
Contributor

@twizmwazin twizmwazin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an improvement, but I have two thoughts:

  1. This should be enabled by default, honestly I don't even know if it needs an option. Do other apps offer this option?
  2. 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 Allow swiping back on comments to return to post view #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.

@CharlieGitDB
Copy link
Contributor Author

CharlieGitDB commented Jun 21, 2023

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 #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
Copy link
Contributor Author

CharlieGitDB commented Jun 21, 2023

@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

@twizmwazin
Copy link
Contributor

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.

@CharlieGitDB
Copy link
Contributor Author

CharlieGitDB commented Jun 21, 2023

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
Copy link
Contributor Author

Themed swipe back

themedswipeback.webm

@twizmwazin twizmwazin self-requested a review June 22, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow swiping back on comments to return to post view
2 participants