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

Fixes #586 : Remove content of AccountsActivity.AccountViewPagerAdapt… #875

Closed

Conversation

JeanGarf
Copy link

The problem appeared when switching to Recent or Favorites Account Tab and then opening another Book.
The problem did not appear when switching to "All" tab, then opening another book, even having open Recent or Favorites tab before "All" tab.

The Exception was thrown in DatabaseAdapter.getID() by the line :
throw new IllegalArgumentException(mTableName + " with GUID " + uid + " does not exist in the db");
because the uid has been built from cursor given in AccountRecyclerAdapter.AccountsListFragment.onBindViewHolderCursor(AccountViewHolder, Cursor), which is a cursor on the previous Book and this uid does not exists in the newly opened Book.

I fixed the issue in (7b6ebb3) by removing the content of AccountsActivity.AccountViewPagerAdapter.destroyItem().

I don't know why this fixed the problem, but I found it by discovering that destroyItem() was not called when switching to "All" Tab, but was when switching to Recent or Favorites Tab.

…PagerAdapter.destroyItem() to avoid app crash when opening another book after switching to Recent or Favorites Accounts Tab
@madushan1000
Copy link

@JeanGarf Can you make a build with your improvements? This project looks dead.

@JeanGarf
Copy link
Author

JeanGarf commented Jun 19, 2020

After having done #876, I restore state as before #586 (in 1e2d83a) and it seems to be OK.

So I remove this pull request, but #586 is fixed by #876.

@JeanGarf JeanGarf closed this Jun 19, 2020
@JeanGarf
Copy link
Author

@JeanGarf Can you make a build with your improvements? This project looks dead.

Yes I can.

Where can I do that ?

@madushan1000
Copy link

You know what, I'll set up an f-droid repo for your version using github actions. I need a couple of other forked apps built anyway which nobody is managing automated builds for.

@madushan1000
Copy link

I've set up a repo here (https://madushan1000.github.io/fdroid-repo/repo/), I can configure it to do automated builds for each commit to your repo if you can configure a webhook.

@JeanGarf
Copy link
Author

JeanGarf commented Aug 14, 2020

Hi madushan1000,

Sorry, I didn't saw your post and therefore, I added a page on my web site to allow downloading of the apk with all my contributions (my 10 Pull Requests. See #882 )
http://thierryw777.free.fr/index.php/bureautique/comptabilite/gnucash-android/

If you're interested to test or use it, tell me if it works fine.

See you

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.

2 participants