[gnome-maps/wip/mlundblad/transit-tweaks: 2/2] resrobot: Use transit tweaks



commit 31ddfde2293a774ec75ab7e55105d6d29ae042bb
Author: Marcus Lundblad <ml update uu se>
Date:   Sat Oct 19 23:16:38 2019 +0200

    resrobot: Use transit tweaks

 src/transitplugins/resrobot.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/transitplugins/resrobot.js b/src/transitplugins/resrobot.js
index f1aedb6d..19048773 100644
--- a/src/transitplugins/resrobot.js
+++ b/src/transitplugins/resrobot.js
@@ -36,6 +36,7 @@ const GraphHopperTransit = imports.graphHopperTransit;
 const HTTP = imports.http;
 const HVT = imports.hvt;
 const TransitPlan = imports.transitPlan;
+const TransitTweaks = imports.transitTweaks;
 const Utils = imports.utils;
 
 const BASE_URL = 'https://api.resrobot.se';
@@ -97,6 +98,7 @@ var Resrobot = class Resrobot {
         this._query = Application.routeQuery;
         this._key = params.key;
         this._tz = GLib.TimeZone.new(NATIVE_TIMEZONE);
+        this._tweaks = new TransitTweaks.TransitTweaks({ name: 'resrobot' });
 
         if (!this._key)
             throw new Error('missing key');
@@ -213,7 +215,9 @@ var Resrobot = class Resrobot {
                         // store the back and forward references from the result
                         this._scrB = result.scrB;
                         this._scrF = result.scrF;
-                        this._processItineraries(itineraries);
+                        this._tweaks.applyTweaks(itineraries, () => {
+                            this._processItineraries(itineraries)
+                        });
                     } else {
                         this._noRouteFound();
                     }


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