This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/lib/cached-topic-list.js.es6
Mark VanLandingham da5e9af10a
FEATURE: Add remembering topic list for group pms (#8235)
* FEATURE: Add remembering topic list for group pms

* added findOrResetCachedBy helper in topic-list

* Created cached-topic-list.js

* Update app/assets/javascripts/discourse/routes/build-private-messages-route.js.es6

Co-Authored-By: Robin Ward <robin.ward@gmail.com>
2019-10-24 09:27:03 -05:00

13 lines
326 B
JavaScript

export function findOrResetCachedTopicList(session, filter) {
const lastTopicList = session.get("topicList");
if (lastTopicList && lastTopicList.filter === filter) {
return lastTopicList;
} else {
session.setProperties({
topicList: null,
topicListScrollPosition: null
});
return false;
}
}