Skip to content

Commit

Permalink
better tab handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronClaydon committed May 2, 2024
1 parent 86d9041 commit a659d8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/Stops/View.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export default {
departures: null,
loadingDepartures: true,

arrivals: null,
loadingArrivals: true,

operatorStats: undefined,

serviceAlerts: [],
Expand Down Expand Up @@ -193,9 +196,9 @@ export default {
},
refreshView() {
// TODO maybe add some sort of rate limiting here?
if (this.currentTab == "departures") {
if (this.currentTab == "departures" && !this.loadingDepartures) {
this.getDepartures()
} else if (this.currentTab == "arrivals") {
} else if (this.currentTab == "arrivals" && !this.loadingArrivals) {
this.getArrivals()
}
},
Expand Down

0 comments on commit a659d8a

Please sign in to comment.