sweyer icon indicating copy to clipboard operation
sweyer copied to clipboard

Allow to keep favorites when enabling/disabling using the MediaStore favorites

Open Abestanis opened this issue 2 years ago • 0 comments

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.

Conflict resolution dialog when enabling the MediaStore favorite backend

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.

Abestanis avatar Jun 25 '22 19:06 Abestanis