LemmyNet / jerboa

A native android app for Lemmy
GNU Affero General Public License v3.0
1.16k stars 166 forks source link

@community(@instances) that are non exising not correctly handled #798

Open MV-GH opened 1 year ago

MV-GH commented 1 year ago

Jerboa Version Latest from main

Describe the bug Clicking on a community that doesnt exist still tries to open a view for that community but then gives an error text and the scroll is than frozen, not sure what it is even displaying. It should either not redirect to that community and say community doesnt exist. or like a templatish thing with default image that community name and some text that says this community doesnt exist yet.

To Reproduce Click on a @community that doesnt exist yet.

Video of the problem

https://github.com/dessalines/jerboa/assets/67873169/5472e30f-1349-4403-9955-448d5b5d3d49

Unrelated (i think) this community actually exists, https://lemmy.ca/c/trippinthroughtime

Kartoffelsaft commented 1 year ago

I've got the same issue trying to connect to https://lemmy.world/c/oldschoolminecraft (long press -> open in external app because it doesn't appear in search).

"Non-existent" isn't how I'd word it because these communities definitely do exist, yet I can't think of another way to describe the issue. "Unknown" maybe?

ZJouba commented 1 year ago

What is the intended behavior when an instance isn't federated with the instance in the link i.e. you cannot search for trippinthroughtime from voyager but you can from lemmy.one?

https://lemmy.one/api/v3/community?name=trippinthroughtime%40lemmy.ca {"community_view":{"community":{"id":8060,"name":"trippinthroughtime"," https://voyager.lemmy.ml/api/v3/community?name=trippinthroughtime%40lemmy.ca {"error":"couldnt_find_community"}

MV-GH commented 1 year ago

The easiest way to handle, clicking on a community that is not known yet to that instance. Would be to open it as usual, when it apistate fails (that error state), check error_msg, does it match with the above error, display a template holder community with some text in the body that says, This community does not exist or is not known yet to this instance. (like most reddit apps)

A future enhancement would be to check if the community actually exists and if so give the option to subscribe/or the action lemmy does to make that community known