* 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>
13 lines
326 B
JavaScript
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;
|
|
}
|
|
}
|