captainepoch / husky

The most famous Pleroma client for Android.
https://husky.adol.pw
GNU General Public License v3.0
27 stars 0 forks source link

The Note field on account is sometimes hidden #29

Open captainepoch opened 4 months ago

captainepoch commented 4 months ago

Husky information

Describe your issue (steps to reproduce it)

Please, describe the steps to reproduce the issue:

  1. Open the account view of an account
  2. For some accounts, the "Your private note about this account" text box is not shown at all.
  3. However, the "Saved!" text below it is still shown briefly on actions (e.g. following)

I did a bit of digging and found that Akkoma sometimes return "note": null instead of "note": "" (empty string) in the Relationship entity (e.g. api/v1/accounts/relationships). When such a response is returned from the server, the note field just disappears.

Husky behaves just fine when the response is an empty string, but any action to the account (e.g. following) seems to set the field to null and then the text box also disappears. Once it disappears, there is no way within Husky to bring it back, but editing the note using another client or the API is a possible workaround.

Ideally, I'd expect Husky to consistently always show the field even if it is null and it should behave the same as an empty string. However, I believe this may interfere with feature detection per this comment. One way around this is to detect if the response JSON contains literally "note": null instead of the field not being present (when we can safely assume the server does not support this feature).

(I cannot find any API spec regarding whether this field should be nullable and I don't know if different instances can agree on this.)

Where did you get Husky from:

--

Original issue: https://codeberg.org/husky/husky/issues/92