Waqas/for545 user last thread not remembered

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