this post was submitted on 27 Dec 2023
15 points (100.0% liked)
Summit
734 readers
7 users here now
Community to discuss Summit, a Lemmy reader for Android.
App (Play Store): https://play.google.com/store/apps/details?id=com.idunnololz.summit
APK: https://github.com/idunnololz/summit-for-lemmy/releases
Patreon: https://patreon.com/SummitforLemmy
Ko-Fi: https://ko-fi.com/summitforlemmy
Website: https://summit.idunnololz.com/
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thinking about this more this is going to be hard to implement even for the current account. I'll give an example. Let's say you were sorting by top. Let's say you had 2 accounts signed in A on a.com instance and B on b.com instance.
Let's say A is the current account.
You refresh. The app pulls a.com's posts and b.com's posts. Due to b.com being a smaller instance a post (let's call it P) is fetched from b.com on page 1. This post is now shown on the combined view.
You scroll down and now more posts are fetched. Now post P is returned by a.com but on page 2. The issue is, originally P was shown but it was retrieved from account B so you can't comment on it with account A. But now we also have P from account A. By dedupping rules this new post P would not be shown.
There are way around this. Specifically every instance can translate links from other instances to its own instance, however the app will need to make these calls for every post which can be very expensive and taxing on the servers.
There is also the argument to be made that P from b.com should never be shown if P exists on a.com because A is the current user. This essentially forces the app to use the translation API which again is expensive.
Thanks for the insight. I wonder if the Liftoff devs decided the calls were worth it.
Actually I just went and read Liftoff's source code. The "multi-instance" fetch logic is here: https://github.com/liftoff-app/liftoff/blob/d7fdeb0f948f0bb17c54617eb8c5b74f556fb01a/lib/pages/home_tab.dart#L377
The tl;dr is that Liftoff uses a very primitive way of handling it. From what I can tell Liftoff does not do any dedupping across instances so the same post may be shown multiple times. This actually makes the implementation much easier.
Do you know if Liftoff dedupped? Eg. would you see the same exact post multiple times? If so that is one simple way to resolve the issue however the user experience is worse.