[gnome-maps] placeStore: Change updateAddTime to updatePlace
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] placeStore: Change updateAddTime to updatePlace
- Date: Thu, 13 Nov 2014 07:23:54 +0000 (UTC)
commit 07bc75b898686f17fa713be84cd8fb38756f1d9f
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Sat Mar 29 22:10:56 2014 +0100
placeStore: Change updateAddTime to updatePlace
Since the name and location of place could change, make sure
we update the place on re-visit and just not the add time.
https://bugzilla.gnome.org/show_bug.cgi?id=726625
src/placeStore.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index ddbe4d1..8352820 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -103,7 +103,7 @@ const PlaceStore = new Lang.Class({
addRecent: function(place) {
if (this._exists(place, PlaceType.RECENT)) {
- this._updateAddTime(place);
+ this._updatePlace(place);
return;
}
@@ -239,13 +239,13 @@ const PlaceStore = new Lang.Class({
}).bind(this));
},
- _updateAddTime: function(place) {
+ _updatePlace: function(place) {
this.foreach((function(model, path, iter) {
let p = model.get_value(iter, Columns.PLACE);
if (p.osm_id === place.osm_id) {
- let updated = new Date().getTime();
- model.set_value(iter, Columns.ADDED, updated);
+ type = model.get_value(iter, Columns.TYPE);
+ this._setPlace(iter, place, type, new Date().getTime());
this._store();
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]