tuskyapp / Tusky

An Android client for the microblogging server Mastodon
https://tusky.app
GNU General Public License v3.0
2.5k stars 390 forks source link

[Bug] "Always show sensitive content" behavior not following account setting #2130

Open nathhad opened 3 years ago

nathhad commented 3 years ago

On one (and only one) of my two Android devices, Tusky is not respecting my account setting to always show sensitive content by default. This behavior is working fine on a web instance of the same account, and on another copy of Tusky on a different device (of the same version number and acquired from the same source). On the first device only, I have to click the "sensitive content" button on each media item to cause it to display. This happens on the one device even if I am simultaneously browsing the same toots from both my devices, side by side for comparison.

I'm open to any recommended steps to attempt to determine whether this issue is caused by something else on my device/account not directly related to Tusky. I have not yet attempted to verify this behavior using a second account on a different instance, but can do so if that might provide useful information. I also have a third (but much older) Android device available I could install and test on with the same account.

Thanks!


charlag commented 3 years ago

Hi This looks weird indeed, would be great if you can determine if it's somehow influenced by OS or old data

nathhad commented 3 years ago

So far I haven't detected a useful pattern.

Unfortunately, the older Samsung third device I had available to try as a third device seems like it may have finally died. It was originally replaced due to a failing charge port, and it's gotten to the point it won't seem to take a charge at all - I'll try one more time to get it working so I can test, we'll see.

To add to the confusion, I added a second instance+account to both devices above, and am getting the same incorrect behavior (still hiding sensitive tweets) on both devices with the new account, including the one that still works fine with the original account.

I can log into either account via web browser and get the expected behavior (all media shows whether sensitive or not), which is part of why I don't think it's directly account or instance related.

nathhad commented 3 years ago

In the process of setting up alt (backup) accounts on a few new servers after my main instance died, I have discovered a useful pattern that provides more information toward this behavior. It's allowing me to replicate it consistently on both different platforms (Android LG V20 and Kindle Fire HD10):

  1. Create a new ID on an instance, and set "Always show media" and "Always expand toots with content warnings" in the preferences of the account itself.
  2. Add this new ID to both my Tusky apps (consistent across both my devices). Tusky will consistently ignore the account settings for sensitive content in my ID account, and will require a click through for sensitive media on both devices.
  3. On each device, work around this using the following procedure:
  4. Go into the account preferences for that device+ID in Tusky, and turn OFF all three: Download media previews, Always show sensitive content, and Always expand toots marked with content warnings. Go back to the timeline, which now shows no media. The order of the following steps appears to be critical:
  5. Go to account preferences, and enable "Always show sensitive content." Return to timeline.
  6. Go to account preferences, and enable "Always expand toots marked with content warnings." Return to timeline.
  7. Go to account preferences, and enable "Download media previews." Return to timeline, and sensitive media will finally show automatically.
  8. This must be repeated on each Tusky app/device. I could fix this via the Fire first, and my login on the LG would still hide sensitive content. Repeating the same steps on the LG would restore it there as well - but this had to be done over again on each device and each ID.

I'm not certain which steps are critical for fixing it, but it does seem that Download media previews has to be turned back on last.

I don't know yet if this is enough information to start identifying the source of the bug, but maybe it'll point in the right direction. Most critically, it seems to make it clear that Tusky is not actually reading these settings from the Mastodon ID in question, but creating/storing them locally in the app.

nathhad commented 3 years ago

Further follow up: I just finished setting up two accounts on a new device (Samsung S20 FE on Android 11), and can confirm that the pattern I reported in my above post remains completely consistent on the new device. Account settings not respected after first login; specific order of disabling and re-enabling the above settings per account fixed the issue on both accounts.

I don't know if it'll help narrow down the cause significantly, but at least this is a reliable workaround for others.

charlag commented 3 years ago

We should check it again after timeline impl changes

nathhad commented 3 years ago

Let me know if/when you need me to test anything later, I'll help if I can. I have it installed on all three devices listed above and available for testing if needed (LG V20, Samsung S20 FE, Kindle Fire HD 10). Install on all three is via F-Droid repository. Thanks!

connyduck commented 2 years ago

Can you please check if this still occurs with Tusky 16.0, @nathhad ?

nathhad commented 2 years ago

Sorry to be slow, many emergencies at the day job the past few weeks.

I set up v16 on a fresh device. Initial behavior was the same, sensitive content and content warning settings were not loaded from my existing account.

The workaround process above also did not work initially - sensitive content did not begin to display until after I had swiped Tusky out of memory and restarted. It's now displaying after workaround process plus restart.

connyduck commented 2 years ago

Ok, this is embarassing.

I just checked the source code to see why this could happen ... and ... it is because we don't implement this feature 😐

It seems both @charlag and I mistook syncing "Always show sensitive content" with "Always mark media as sensitive".

Sorry, this shouldn't have happened. Will fix as soon as possible.

nathhad commented 2 years ago

Ok, this is embarassing.

Hey, there's nothing to be embarassed about with this great piece of software! And if it's gotten to v16 and I'm the first to notice - I'd say you're doing pretty dang well! I'm happy to switch it on manually with the workaround I have until you guys get a chance to fix it up in a future build, and thanks again for such a good tool that I use every day.

charlag commented 2 years ago

@connyduck didn't we fix this?

connyduck commented 2 years ago

No, we don't have the option in the app at all currently