From 93e188d11800f7f704183fd60d4138b832f2b4a2 Mon Sep 17 00:00:00 2001 From: asmsuechan Date: Thu, 12 Oct 2017 20:28:23 +0900 Subject: [PATCH] Change to be able to search on starred --- browser/main/NoteList/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index 3f57fdc9..6f3860eb 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -243,8 +243,9 @@ class NoteList extends React.Component { } if (location.pathname.match(/\/starred/)) { - return data.starredSet.toJS() - .map((uniqueKey) => data.noteMap.get(uniqueKey)) + const starredNotes = data.starredSet.toJS().map((uniqueKey) => data.noteMap.get(uniqueKey)) + this.contextNotes = starredNotes + return starredNotes } if (location.pathname.match(/\/searched/)) { @@ -256,8 +257,9 @@ class NoteList extends React.Component { } if (location.pathname.match(/\/trashed/)) { - return data.trashedSet.toJS() - .map((uniqueKey) => data.noteMap.get(uniqueKey)) + const trashedNotes = data.trashedSet.toJS().map((uniqueKey) => data.noteMap.get(uniqueKey)) + this.contextNotes = trashedNotes + return trashedNotes } return this.getContextNotes()