From 953713035be401a61db02343ed130f697873456b Mon Sep 17 00:00:00 2001 From: Sebastian Ovide Date: Mon, 14 Jun 2021 14:20:39 +0100 Subject: [PATCH] deleted not used indexes --- firestore.indexes.json | 16 ---------------- src/App.js | 1 - src/features/firebase/dbFirebase.js | 5 +---- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/firestore.indexes.json b/firestore.indexes.json index 37185801..1bb23f24 100644 --- a/firestore.indexes.json +++ b/firestore.indexes.json @@ -1,13 +1,5 @@ { "indexes": [ - { - "collectionGroup": "photos", - "queryScope": "COLLECTION", - "fields": [ - { "fieldPath": "published", "mode": "ASCENDING" }, - { "fieldPath": "moderated", "mode": "DESCENDING" } - ] - }, { "collectionGroup": "photos", "queryScope": "COLLECTION", @@ -16,14 +8,6 @@ { "fieldPath": "updated", "mode": "DESCENDING" } ] }, - { - "collectionGroup": "photos", - "queryScope": "COLLECTION", - "fields": [ - { "fieldPath": "published", "mode": "ASCENDING" }, - { "fieldPath": "updated", "mode": "DESCENDING" } - ] - }, { "collectionGroup": "photos", "queryScope": "COLLECTION", diff --git a/src/App.js b/src/App.js index 9f85f6f5..edc38449 100644 --- a/src/App.js +++ b/src/App.js @@ -316,7 +316,6 @@ class App extends Component { } async registerPublishedPhotosRT() { - debugger if (this.unregisterPublishedPhotosRT) { await this.unregisterPublishedPhotosRT(); } diff --git a/src/features/firebase/dbFirebase.js b/src/features/firebase/dbFirebase.js index 501674ee..b532c62d 100644 --- a/src/features/firebase/dbFirebase.js +++ b/src/features/firebase/dbFirebase.js @@ -1,6 +1,6 @@ import firebase from "firebase/app"; import _ from "lodash"; - + import * as localforage from "localforage"; import appConfig from "custom/config"; @@ -67,9 +67,6 @@ function publishedPhotosRT(addedFn, modifiedFn, removedFn, errorFn, fromDate) { ">", firebase.firestore.Timestamp.fromDate(fromDate) ); - } else { - // to date defined. Get le latest 100 so the map will not be empoty. - newPublishedRef = publishedPhotosRef.limit(100); } // any published photo