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

Timeline position reset when using notifications #4895

Open
Lakoja opened this issue Jan 26, 2025 · 5 comments
Open

Timeline position reset when using notifications #4895

Lakoja opened this issue Jan 26, 2025 · 5 comments
Labels

Comments

@Lakoja
Copy link
Collaborator

Lakoja commented Jan 26, 2025

Detailed description

I post this because it is (always) reproducible for me, but maybe it also fixes other problems like some of the triggers posted in #3960

Steps to reproduce the problem

  1. Scroll to some position in the home timeline
  2. Get a notification
  3. Tap that notification which switches to the notification view (and reloads that)
  4. Switch to the home timeline

This reloads (refreshes completely?) the home timeline and leaves you at a random looking location.

It does not happen when the system notification is not tapped (but i. e. you switch to notifications yourself and reload them).

When doing this multiple times the new location is every time another one. Would be quite funny if it weren't a bug.

Push notifications help with step 2.

Debug information

Current develop
Android 14

@Lakoja Lakoja added the bug label Jan 26, 2025
@connyduck
Copy link
Collaborator

That probably happens because MainActivity is restarted for each notification.

@Lakoja
Copy link
Collaborator Author

Lakoja commented Jan 26, 2025

When?

It does not occur (restart) if you are staying inside Tusky (not tap the system notification).

@connyduck
Copy link
Collaborator

When you click the notification, it opens a new instance of MainActivity. I think. That would explain that the timeline position is lost.

@Lakoja
Copy link
Collaborator Author

Lakoja commented Jan 26, 2025

When you click the notification, it opens a new instance of MainActivity. I think. That would explain that the timeline position is lost.

That would explain a lot of problem then, I guess.
"Losing position on a new instance of MainActivity." Which happens rather frequently I guess.
But why would it start at "some random looking position" and not the top?

@connyduck
Copy link
Collaborator

I think it starts at the top of the cached timeline, and then loads new stuff above. Depending on the circumstances that may look random. But I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants