Waqas/for545 user last thread not remembered

Note: I will add the tests in the subsequent commit
you can just define date_order inline