Yifan Zhao

Results 21 comments of Yifan Zhao

I'm still working on deleting meta category when deleting an account.

`Reading` and `updating` are realized as I said in the relevant issue. As for `deleting`, I get the `SharedPreferences` of current `context` and uses `sharedPreferences.remove()` to remove the related value...

There's stiil a problem that I don't know how to test the modified code, so I check the keys mannually to make sure they are the same. The `NotesRepositoryTest` is...

> Yeah, we don't have that much tests (yet). I am working from time to time on the coverage, but that's a huge load of work, given that we started...

I’ve modified the code according to the above suggestions and passed the latest added tests. 😄

I don't know exactly what to do in the migration. Should I refresh the sharedPreferences? Or should I uses the refreshed sharedPreferences to update the database using execSQL?

> You basically need to read all account IDs from the database, migrate sharedPreferences as [described here](https://github.com/stefan-niedermann/nextcloud-notes/issues/1169#issuecomment-833539263) and then remove the old sharedPreferences which were not account specific How can...

I think I've finished with that. Please check whether there is a problem. Thanks a lot!😆

> > How can I know the structure of the table of database? > > We are using the [Room](https://developer.android.com/training/data-storage/room/#java) library as [ORM](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping). The entities are defined in [`NotesDatabase`](https://github.com/stefan-niedermann/nextcloud-notes/blob/master/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesDatabase.java#L40-L46) at...

> > Do I need to add the modified sharedPreferences to the database? > > No. > > But you are removing the keys too early. This way it will...