sampie777 / hymnbook2

Mobile hymn book app.
2 stars 0 forks source link

Use UUID instead of ID for passing objects between screens #253

Open sampie777 opened 1 month ago

sampie777 commented 1 month ago

Instead of passing a ID to SongDisplayScreen, use the UUID. This will fix the bug when:

  1. Update database bundle.
  2. While updating, open a song.
  3. When updated, this exact song doesn't exist in database anymore.
  4. Open verse picker and close it again to go back to the song.
  5. As the ID doesn't exist anymore, no song will be displayed.

That's why the UUID must be used, as the UUID will remain the same.

But first, automatic updates must be implemented, so that very old databases without UUID will be replaced with new versions with UUID: #76