iPurpl3x I'm writing an extension which enables sorting discussions by comment_count so that it's possible to see discussions that have not yet been answered. For the implementation of this, I went to see the michaelbelgium/flarum-discussion-views extension's source code. Now what's annoying is that all discussions that have no answer are then sorted by id (I guess) and therefore old discussions are at the top. Is there a way to sort discussions by comment_count (ascending) and then also by created_at (descending) ?
iPurpl3x I think I will manage this differently in the end, and set up a whole new route where I give some specific search criteria t show ONLY discussions without answer. And this should only be visible for Mods. This will give me more flexibility over the request as I will use my own Controller. In the end I want to have an extension that notifies Mods about discussions that have not yet been answered.
clarkwinkelmann Can you share some code ? I suppose it's possible to sort by more than one column (?) Also there is already a commentCount sorting in Flarum, it's called "Top" in the homepage selector. Are you improving it or creating a new sorter ?
iPurpl3x clarkwinkelmann I started working on something else, so maybe I will share this later. I first tried to make it sort by comment_count but in ascending order, not descending (Top).