[gnome-maps/wip/mlundblad/remove-contacts: 4/7] placeStore: Remove handling of contacts




commit 40e4ba77cc1615034b1d1759f8e9545ebc61688c
Author: Marcus Lundblad <ml dfupdate se>
Date:   Wed Jun 22 22:30:47 2022 +0200

    placeStore: Remove handling of contacts

 src/placeStore.js | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index 5a17d503..d95a6ce7 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -23,7 +23,6 @@ import GdkPixbuf from 'gi://GdkPixbuf';
 import GeocodeGlib from 'gi://GeocodeGlib';
 import Gtk from 'gi://Gtk';
 
-import {ContactPlace} from './contactPlace.js';
 import {Place} from './place.js';
 import {StoredRoute} from './storedRoute.js';
 import * as Utils from './utils.js';
@@ -39,7 +38,7 @@ export class PlaceStore extends Gtk.ListStore {
         ANY: -1,
         RECENT: 0,
         FAVORITE: 1,
-        CONTACT: 2,
+        CONTACT: 2, // Legacy, this is not handled anymore
         RECENT_ROUTE: 3
     }
 
@@ -86,14 +85,6 @@ export class PlaceStore extends Gtk.ListStore {
         this._store();
     }
 
-    _addContact(place) {
-        if (this.exists(place, PlaceStore.PlaceType.CONTACT)) {
-            return;
-        }
-
-        this._addPlace(place, PlaceStore.PlaceType.CONTACT);
-    }
-
     _addFavorite(place) {
         if (!place.store)
             return;
@@ -206,8 +197,6 @@ export class PlaceStore extends Gtk.ListStore {
             this._addFavorite(place, type);
         else if (type === PlaceStore.PlaceType.RECENT)
             this._addRecent(place, type);
-        else if (type === PlaceStore.PlaceType.CONTACT)
-            this._addContact(place, type);
         else if (type === PlaceStore.PlaceType.RECENT_ROUTE)
             this._addRecentRoute(place);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]