sweyer
sweyer copied to clipboard
Allow to keep favorites when enabling/disabling using the MediaStore favorites
This improves the user experience when switching the Use Android system for favorite tracks
setting. This is a continuation of my proposal in https://github.com/nt4f04uNd/sweyer/pull/34#discussion_r878749919.
With this change, when user enables the setting and there are conflicts between the apps favorite state and the MediaStore favorite state, a following dialog is displayed.
The dialog contains a list, where we display all songs which are locally marked as favorite, but not in the MediaStore with an enabled favorite indicator.
Below them, we show the songs which are marked as favorite in the MediaStore, but not locally with a disabled favorite indicator.
We don't show non-conflicting songs.
The user can then choose which of the songs should stay marked as favorite. When the user clicks the Accept
button, we update the MediaStore if necessary. If the user clicks cancel or outside the dialog, we abort and disable the setting again.
When the user disables the setting, we save the currently marked favorites in the local database. No dialog is needed, because at this point the MediaStore is the only source of truth.
This includes #74, please merge it before this.