[gnome-maps] placestore don't try to load routes if limit is reached
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] placestore don't try to load routes if limit is reached
- Date: Wed, 17 Feb 2016 11:50:49 +0000 (UTC)
commit 020a1fb045425714ff5bbdb070cd0c2a0cf1f04d
Author: Alaf Azam <alafazam gmail com>
Date: Tue Feb 16 23:35:46 2016 +0530
placestore don't try to load routes if limit is reached
https://bugzilla.gnome.org/show_bug.cgi?id=762094
src/placeStore.js | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index a472a69..f32beb5 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -177,8 +177,9 @@ const PlaceStore = new Lang.Class({
let p;
if (type === PlaceType.RECENT_ROUTE) {
- if (this._numRecentRoutes < this._recentRoutesLimit)
- p = StoredRoute.StoredRoute.fromJSON(place);
+ if (this._numRecentRoutes >= this._recentRoutesLimit)
+ return;
+ p = StoredRoute.StoredRoute.fromJSON(place);
this._numRecentRoutes++;
} else {
p = Place.Place.fromJSON(place);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]