Automattic / pocket-casts-android

Pocket Casts Android 🎧
Mozilla Public License 2.0
2.53k stars 208 forks source link

Episodes automatically archived when listening on the watch #1203

Open thabotswana opened 11 months ago

thabotswana commented 11 months ago

Description

Even if global and podcast auto archive options are disabled, when resuming an episode on the watch that was started on the phone, finishing it results in the last episode you finished being archived on the phone.

Reported in 6542937-zen

debug.txt

Step-by-step reproduction instructions

  1. Go to Settings -> Auto archive in the phone app and set archive options to "Never".
  2. Finish one episode and start a second episode on the phone.
  3. Resume listening to the second episode in the watch.
  4. While listening in the watch, the previous episode on the phone gets archived.

I am able to replicate this behavior using the Wear OS emulator in Android Studio.

Screenshots or screen recording

No response

Did you search for existing bug reports?

Device, Operating system, and Pocket Casts app version

Samsung Galaxy S10+ wAndroid 12, Pocket Casts 7.42

mchowning commented 11 months ago

It looks like this is happening because the auto archive setting is not synced between devices and the watch app defauls to archiving played episodes (with no way to change it currently).

The episode manager searches for played episodes, and archives them. Once the episode is archived on the watch, that new status for the episode is synced up to the server, and then set to the phone.

I was able to reproduce this a bit more directly by:

  1. finishing an episode on the phone
  2. Tapping "Refresh now" on the watch two times. I think the first time gets the played state from the phone and the second time sends the new archived state from the watch back up to the server.
  3. Tapping "Refresh now" on the phone.

I can create the same issue between two Android phones if one has archive after play turned on and the other one has it turned off (i.e. has just logged into the same account and has not updated the archive setting from the default). Obviously, in the two phone scenario the user can at least change the preference on the second device.

I think the best way to proceed with this is to just wait for the sync project to be finished. At that point this setting will be synced across the devices and the issue should go away.