From 541e4ebe3715f97ccab8f5a148b9eda21637908f Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 2 Jan 2020 21:17:29 -0800 Subject: [PATCH] feat: Show drafts to author in collections (#1134) --- app/stores/DocumentsStore.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/app/stores/DocumentsStore.js b/app/stores/DocumentsStore.js index 5bf0944f2..614a840b3 100644 --- a/app/stores/DocumentsStore.js +++ b/app/stores/DocumentsStore.js @@ -77,19 +77,11 @@ export default class DocumentsStore extends BaseStore { } leastRecentlyUpdatedInCollection(collectionId: string): Document[] { - return orderBy( - this.publishedInCollection(collectionId), - 'updatedAt', - 'asc' - ); + return orderBy(this.inCollection(collectionId), 'updatedAt', 'asc'); } recentlyUpdatedInCollection(collectionId: string): Document[] { - return orderBy( - this.publishedInCollection(collectionId), - 'updatedAt', - 'desc' - ); + return orderBy(this.inCollection(collectionId), 'updatedAt', 'desc'); } recentlyPublishedInCollection(collectionId: string): Document[] { @@ -101,7 +93,7 @@ export default class DocumentsStore extends BaseStore { } alphabeticalInCollection(collectionId: string): Document[] { - return naturalSort(this.publishedInCollection(collectionId), 'title'); + return naturalSort(this.inCollection(collectionId), 'title'); } searchResults(query: string): SearchResult[] {