recent_topics: Add persistence for filters via localstorage.

Previously the filter would be reset every time the page was
refreshed. This commit adds persistence via localstorage, the tests
follow the pattern used in tests for drafts.

Fixes: #15676.
This commit is contained in:
YashRE42
2020-09-20 23:43:18 +00:00
committed by Tim Abbott
parent 7fc28eaa16
commit 2cd234f1b7
5 changed files with 42 additions and 4 deletions

View File

@@ -113,9 +113,10 @@ const messages = {
// This is an example of a deep unit test, where our dependencies
// are easy to test. Start by requiring the dependencies:
zrequire("recent_senders");
zrequire("localstorage");
const unread = zrequire("unread");
const stream_topic_history = zrequire("stream_topic_history");
zrequire("recent_topics");
const recent_topics = zrequire("recent_topics");
// And finally require the module that we will test directly:
const message_store = zrequire("message_store");