[gnome-maps/wip/mlundblad/es6-modules: 15/22] graphHopper: Stop using imports.mainloop




commit cfb31c0f2ed76890324fabe242837ea47d2bcefa
Author: Marcus Lundblad <ml dfupdate se>
Date:   Wed May 25 23:18:32 2022 +0200

    graphHopper: Stop using imports.mainloop
    
    Replace Mainlopp.idle_add() with GLib.idle_add().

 src/graphHopper.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/graphHopper.js b/src/graphHopper.js
index f6115fc7..76a9b533 100644
--- a/src/graphHopper.js
+++ b/src/graphHopper.js
@@ -20,7 +20,6 @@
  */
 
 import GLib from 'gi://GLib';
-const Mainloop = imports.mainloop;
 import Soup from 'gi://Soup';
 
 import {BoundingBox} from './boundingBox.js';
@@ -70,7 +69,7 @@ export class GraphHopper {
     }
 
     _updateFromStored() {
-        Mainloop.idle_add(() => {
+        GLib.idle_add(null, () => {
             if (!this.storedRoute)
                 return;
 


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