Open dannekrose opened 1 year ago
Which mobile app is this related to, iOS or Android?
I'm using iOS (iphone 11 Pro). I don't know if this is the case for Android or not, but I would suspect the same.
Are you running the latest version of the Mastodon iOS app (1.4.8)? It seems like the new hashtag following UI is available unconditionally, so it should work even if you aren’t logging into a Mastodon-based server. Are you unable to see the UI or are you running into problems with the follow button not behaving correctly?
I am running the latest version 1.4.8. I can click on a hashtag and see that I’m following it and unfollow if I want, but I do not have the list of followed hashtags available on my profile screen as documented here.
https://mstdn.social/@feditips/109490860581325719
Note : my profile screen does not show the hashtag in the top row as indicated by the above post even though it is supported by Akkoma 3.5.0. It does give me the option to follow or follow hashtags, but not the ability to see the list from my profile screen.
This is what I see at the top. Note the missing hashtag mark.
OK, that makes sense! The code that controls whether or not the hashtag button is visible on the profile is
…which checks that the server is running v4.0.0 or newer (of any software) as reported by /api/v1/instance
. I’m not sure what Akkoma returns for this endpoint but it might have to return a fake value here (unless there’s a better way to feature detect hashtag support?)
The changes added to allow Akkoma to follow hashtags are linked from this commit. https://akkoma.dev/AkkomaGang/akkoma/pulls/336
OK, that makes sense! The code that controls whether or not the hashtag button is visible on the profile is
…which checks that the server is running v4.0.0 or newer (of any software) as reported by
/api/v1/instance
. I’m not sure what Akkoma returns for this endpoint but it might have to return a fake value here (unless there’s a better way to feature detect hashtag support?)
Given that potentially other compatible software may add the feature to follow tags, perhaps a check the sets a variable for “Supports hashtag following” to be a bit more robust might be worth considering. While I know Pixelfed isn’t targeted by the mobile app, Pixelfed also has supported hashtag following for some time.
Just a thought and humble request. I know the focus is on supporting Mastodon first and foremost. I just wanted to at least share about other software and raise awareness. Thank you for looking at this at all.
Ok I think the best way to detect this would be to occasionally fetch the metadata for a hashtag and test whether or not the following
property is present in the response. That can be used to gate the visibility of the Follow button as well as the icon on the profile tab.
Would checking this endpoint work as well?
I spent a little time testing this out. My approach sort-of works (works great for controlling the Follow button visibility, but can’t easily be used for the profile tab). Ultimately the problem is that a synchronous check is needed for whether or not the hashtag button should be shown, but network requests are async. One approach would be to eagerly fetch and save the user’s followed hashtags (which I think is reasonable?) and then stash whether the request was successful on a new property of the Instance
object. That would require slightly larger code changes though so I’m gonna put this on hold for a bit… maybe someone else will pick it up?
Pitch
Akkoma 3.5.0 added the ability to follow hashtags and according to the dev the api endpoints are the same as Mastodon. Could the Mobile app add recognition for Akkoma 3.5.0 instances to see, follow, and manage hashtags? The endpoints are the same so I believe this shouldn’t be a large code change. It would just be a recognizing of the instance software and using the same API endpoints when connected to an Akkoma 3.5.0 instance.
Motivation
Hashtag following and management is wonderful and providing this relatively simple change of recognizing Akkoma 3.5.0 as also being able to follow and use hashtags the same as Mastodon makes this client even more versatile and universal in the tumultuous mobile app space.