Top level acount list empty
With my imported book, bf4f7d06b3 on develop branch, the top-level account list shows nothing. The recent account list is correct, and accounts dropbox can be used. Sub-accounts list seem to be OK.
That commit just reverts the file chooser selector to what it has been for many previous releases (application/). I think I changed the mime type some commits ago to (file/) but later I realized that this did not improve the selection of apps to provide files for import, but rather made it worse. So I reverted the change.
I do not quite understand what you mean by the top-level accounts list shows nothing? The type in the referenced commit should only affect which apps are shown as possible sources for your file to import.
Sorry I didn't mean the commit caused the problem, but rather the code after that commit has the problem. I don't exactly know which commit caused this.
Just after merging develop into my branch, I noticed there is nothing shown on the top-level account list, only a "create account" button. I thought it was some incompatibility between our edits, so tried to pinpoint the problem, but failed. Later I checked the development head, which also shows the problem, so I think I should post an issue.
Oh, I see. That is indeed weird, and I cannot replicate it. I know there has been some issue with the different account list fragments sometimes not refreshing properly. But the top-level always was shown and the others had the problem.
My first instinct would be to say there is something going on with the root account. I'll look into it. Was your book generated by GnuCash desktop? Did the import succeed?
My book is generated by GnuCash Desktop. It imported successfully, I can correctly see the recent account list. And from the Accounts dropdown list, I can access any account correctly.
I cannot replicate it either now.
This may be caused by the db migration code, as my db is already version8 , and the migration code upgraded it again when merging the new migration code.
I haven't go through the code to pinpoint the real cause, but as this situation would never happen in real use, I think we close this issue now.
My bad. It is still happening, randomly.
Found the reason.
It is because deleteAllRecords is moved out of the transaction. Another call to getOrCreateGnuCahsRootAccount (when trying to show the top level account list) created a ROOT account after deleteAllRecords is called, which is not deleted when all others are added to the DB. This results in double ROOT account in the DB.
When trying to show the top level accounts, the new added ROOT (not he one imported) is selected, which has no child account at all, resulting in the empty view.
As in the develop head now, deleteAllRecords is already moved back, I'll close this.
Good that this is fixed. :+1: @fefe982 can you please test the db migration in develop? I know you have some large datasets which you could try to migrate to db version 8. ;) Migration works in my tests, but I would like to know it works somewhere else before I put out a beta release. Thanks.
I'm going on a vacation tomorrow, and may not have time to work on this in about ten days. I can test the migration after that, but you won't get the results sooner.
No problem. It can wait. Have fun on your vacation :+1:
Would you provide apks for 1.5.5 and the most recent beta?
I was not able to successfully switch between gradle / non-gradle projects. I cannot get the project built at master.
And my internet connection is (very) bad and it is painful for me to switch between gradle / non-gradle builds to get all the dependencies from the internet.
Old releases are available on GitHub: https://github.com/codinguser/gnucash-android/releases I will send you a build for the most recent beta