Add a sort operation to the threads list before rendering the template, ordering threads by their last_message_on timestamp in descending order so the most recently active threads appear first.
Add a sort operation to the threads list before rendering the template, ordering threads by their last_message_on timestamp in descending order so the most recently active threads appear first.