Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enable swiping on comments to go back to posts#785

Merged
twizmwazin merged 30 commits into
LemmyNet:mainfrom
CharlieGitDB:main
Jun 22, 2023
Merged

Enable swiping on comments to go back to posts#785
twizmwazin merged 30 commits into
LemmyNet:mainfrom
CharlieGitDB:main

Conversation

@CharlieGitDB

@CharlieGitDB CharlieGitDB commented Jun 21, 2023

Copy link
Copy Markdown
Contributor

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

@twizmwazin twizmwazin left a comment

Copy link
Copy Markdown
Contributor

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 #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

CharlieGitDB commented Jun 21, 2023

Copy link
Copy Markdown
Contributor Author

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

CharlieGitDB commented Jun 21, 2023

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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

CharlieGitDB commented Jun 21, 2023

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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