diff --git a/src/App.vue b/src/App.vue index d715c85e..f0de49b0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,7 +11,7 @@ import Menu from '@/components/Menu.vue'; import { IonApp, IonRouterOutlet, IonSplitPane } from '@ionic/vue'; import { defineComponent } from 'vue'; -import { loadingController, alertController } from '@ionic/vue'; +import { loadingController } from '@ionic/vue'; import { useStore } from "./store"; import emitter from "@/event-bus" export default defineComponent({ @@ -28,28 +28,6 @@ export default defineComponent({ } }, methods: { - async timeZoneDifferentAlert(payload: any) { - const alert = await alertController.create({ - header: this.$t("Change time zone"), - message: this.$t('Would you like to update your time zone to . Your profile is currently set to . This setting can always be changed from the settings menu.', { localTimeZone: payload.localTimeZone, profileTimeZone: payload.profileTimeZone }), - buttons: [ - { - text: this.$t("Dismiss"), - role: 'cancel', - cssClass: 'secondary' - }, - { - text: this.$t("Update time zone"), - handler: () => { - this.store.dispatch("user/setUserTimeZone", { - "tzId": payload.localTimeZone - }); - }, - }, - ], - }); - return alert.present(); - }, async presentLoader() { if (!this.loader) { this.loader = await loadingController @@ -75,12 +53,10 @@ export default defineComponent({ translucent: true, backdropDismiss: true }); - emitter.on('timeZoneDifferent', this.timeZoneDifferentAlert); emitter.on('presentLoader', this.presentLoader); emitter.on('dismissLoader', this.dismissLoader); }, unmounted() { - emitter.off('timeZoneDifferent', this.timeZoneDifferentAlert); emitter.off('presentLoader', this.presentLoader); emitter.off('dismissLoader', this.dismissLoader); }, diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 87fb672f..7c8d70d4 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -54,10 +54,6 @@ const actions: ActionTree<UserState, RootState> = { async getProfile ( { commit }) { const resp = await UserService.getProfile() if (resp.status === 200) { - const localTimeZone = DateTime.local().zoneName; - if (resp.data.userTimeZone !== localTimeZone) { - emitter.emit('timeZoneDifferent', { profileTimeZone: resp.data.userTimeZone, localTimeZone}); - } commit(types.USER_INFO_UPDATED, resp.data); } },