From 80fcc890fa761a50a89cf77020b7f2978f04af55 Mon Sep 17 00:00:00 2001
From: Kacper Donat <kadet1090@gmail.com>
Date: Wed, 19 Sep 2018 21:11:55 +0200
Subject: [PATCH] gdynia now has 1 based stop sequence

---
 resources/ts/components/departures.ts                    | 4 ++--
 resources/ts/decorators.ts                               | 2 +-
 src/Provider/ZtmGdansk/ZtmGdanskDataUpdateSubscriber.php | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/resources/ts/components/departures.ts b/resources/ts/components/departures.ts
index ea6ef3d..367c374 100644
--- a/resources/ts/components/departures.ts
+++ b/resources/ts/components/departures.ts
@@ -4,7 +4,7 @@ import { Component, Prop, Watch } from "vue-property-decorator";
 import urls from '../urls';
 import * as moment from "moment";
 import { FetchingState, Jsonified } from "../utils";
-import { debounce, Notify } from "../decorators";
+import { debounce, notify } from "../decorators";
 
 @Component({ template: require("../../components/departures.html") })
 export class Departures extends Vue {
@@ -21,7 +21,7 @@ export class Departures extends Vue {
     @Prop({ default: 20, type: Number })
     interval: number;
 
-    @Notify()
+    @notify()
     state: FetchingState;
 
     @Watch('stops')
diff --git a/resources/ts/decorators.ts b/resources/ts/decorators.ts
index 7dcda85..14a3dfa 100644
--- a/resources/ts/decorators.ts
+++ b/resources/ts/decorators.ts
@@ -58,7 +58,7 @@ export const condition = decorator(function <Args extends any[], Ret extends any
 // decorators.js
 import { createDecorator } from 'vue-class-component'
 
-export const Notify = (name?: string) => createDecorator((options, key) => {
+export const notify = (name?: string) => createDecorator((options, key) => {
     const symbol = Symbol(key);
 
     if (typeof options.computed === 'undefined') {
diff --git a/src/Provider/ZtmGdansk/ZtmGdanskDataUpdateSubscriber.php b/src/Provider/ZtmGdansk/ZtmGdanskDataUpdateSubscriber.php
index d592df0..86ac191 100644
--- a/src/Provider/ZtmGdansk/ZtmGdanskDataUpdateSubscriber.php
+++ b/src/Provider/ZtmGdansk/ZtmGdanskDataUpdateSubscriber.php
@@ -176,7 +176,7 @@ class ZtmGdanskDataUpdateSubscriber implements EventSubscriberInterface
                         $this->ids->generate($provider, $stop['stopId'])
                     ),
                     'track' => $entity,
-                    'order' => $stop['stopSequence'],
+                    'order' => $stop['stopSequence'] + (int)($stop['stopId'] > 30000), // HACK! Gdynia has 0 based sequence
                 ]);
             });