thunder-app/thunder

☂️ Support for lemmy 0.19.x

Opened this issue · 7 comments

Description
This is an umbrella issue to track overall changes to support lemmy 0.19.x versions and potential features. As we get more details on the changes in 0.19.x, this issue should be updated to reflect those changes.

Related Posts:

Tracking

  • Ability to block instances. Related issue(s): #701
  • Perform checks to see if 2FA two-step process requires changes
  • Breaking change: add ability to authenticate API calls using headers/cookies
  • Ability to import and export community follows, blocklists, and profile settings
  • New Scaled/Controversial post sort type and Controversial comment sort type

Discussion Points

  • There needs to be a way to ensure that we continue support for 0.18.x instances without any breaking changes

Also see: #1447

Exciting! Here are a couple initial musings I just wanted to jot down.

  • There will almost certainly be some work needed in https://github.com/thunder-app/lemmy_api_client, and I wonder if we'll be able to pick up any upstream changes from https://github.com/liftoff-app/lemmy_api_client.
  • We might want to add a way to check the server version, which will allow us to (a) refuse connections to versions we don't support and (b) once we support multiple version, split API calls as needed.
  • If/when there is a beta build of 0.19.x, it would be nice if we could find an instance running it for testing.
  • It looks like LemmyNet/lemmy#3965 will be a very nice change for us, as the lack of child comments loading has been a source of consternation over here. 😆

I saw this linked in LemmyNet/lemmy#3965. I'm still not entirely sure if I should always be returning deleted/removed comments, or just change how they get filtered on the server so that they get returned in more situations than they are currently. Given this is something that is mostly going to affect maintainers for various different lemmy frontends, the input of the contributors here would be quite useful.

Hey @SleeplessOne1917, thanks for checking in with us!

I believe we would prefer that you always return deleted comments. I think dessalines hits the nail on the head in this comment. If the tree is manipulated in any way on the back end, that will make it much harder for us to render on the front end.

Now whether you clear the contents, or set it to deleted by creator or return the full original contents, we really don't care. Again, as dessalines mentioned, we can check deleted, removed, blocked and update the contents ourselves if needed. We already do that for deleted inbox replies.

PrivateMessageView cleanDeletedPrivateMessage(PrivateMessageView message) {
if (!message.privateMessage.deleted) {
return message;
}
PrivateMessage privateMessage = PrivateMessage(
id: message.privateMessage.id,
creatorId: message.privateMessage.creatorId,
recipientId: message.privateMessage.recipientId,
content: "_deleted by creator_",

Thanks for the feedback! I'll go with that then.

More details about the changes! https://lemmy.ml/post/5711722

I'm personally really looking forward to the new "scaled" sort option.

There is a TODO in #1139 for Lemmy 0.19 now related to marking multiple items as read at a time. The specific code point can be found here prior to the PR merge: https://github.com/Fmstrat/thunder/blob/bfec3984169d458e371e46d8dbd9d471372e10c8/lib/post/utils/post.dart#L50

Basically, there is a for loop that marks all items in the postIds array read one at a time. However the API library that Thunder uses already supports passing in postIds instead of postId, so once full detection of 0.19 servers is in place, this can be passed in instead of the for loop.