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

Bug - show content - current page is not remembered after screen rotation #53

Closed
orionlee opened this issue Mar 27, 2019 · 1 comment · Fixed by #58
Closed

Bug - show content - current page is not remembered after screen rotation #53

orionlee opened this issue Mar 27, 2019 · 1 comment · Fixed by #58
Assignees
Labels
Milestone

Comments

@orionlee
Copy link
Contributor

Version: v3.4.1

Steps to reproduce:

  • In show table content screen,
  • users traverse to subsequent pages, e.g., page 2,
  • rotates the screen
  • the content shown is back to page 1
@orionlee
Copy link
Contributor Author

Diagnosis: The issue is in TablePageAdapter() constructor, in determining the position (with respect to rows) based on the supplied page startPage,

https://github.com/infinum/android_dbinspector/blob/v3.4.1/dbinspector/src/main/java/im/dino/dbinspector/adapters/TablePageAdapter.java#L57

  • it tries to determine number of pages available for the table by pageCount().
  • At that point of the code (constructor), pageCount is always 0, as the actual data (number of rows) is not available until getContentPage() is invoked.

@bojankoma bojankoma self-assigned this Sep 25, 2020
@bojankoma bojankoma added this to the 5.0.0 milestone Sep 25, 2020
@bojankoma bojankoma added the bug label Sep 25, 2020
@bojankoma bojankoma linked a pull request Oct 21, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants