how do you construct a user overview while respecting sort?

I just implemented a user overview of mixed posts and comments, but I’m unsure how to do so while respecting sort (hot, new, old, etc.). Currently I merge the user’s comments and posts into a list, then sort them all by timestamp.

Because sorting is handled on the server, and merging posts/comments happens after, I can’t see how I can’t respect sort and still merge the two sets. Does anyone have any pointers?

I expect a similar issue would arise for the unified inbox view also (replies, mentions, and private messages), although in that case there’s less need to sort by anything other than recency.

EDIT: here’s the relevant ts code in the official lemmy ui. it sorts by date if sort is new, which i already do, then otherwise it just sorts by “score”.

github.com/LemmyNet/…/person-details.tsx#L245

blawsybogsy,

maybe it can’t be done? I think Jerboa doesn’t implement, but i thought the web UI did…

  • All
  • Subscribed
  • Moderated
  • Favorites
  • lemmydev@lemm.ee
  • khanakhh
  • magazineikmin
  • osvaldo12
  • GTA5RPClips
  • mdbf
  • Youngstown
  • tacticalgear
  • slotface
  • rosin
  • kavyap
  • ethstaker
  • everett
  • thenastyranch
  • DreamBathrooms
  • megavids
  • InstantRegret
  • cubers
  • normalnudes
  • Leos
  • ngwrru68w68
  • cisconetworking
  • modclub
  • Durango
  • provamag3
  • anitta
  • tester
  • JUstTest
  • lostlight
  • All magazines