From ace6419aefbf9811c5a0f203baa83dc682d8e2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Thu, 14 Feb 2019 13:39:42 +0900 Subject: [PATCH] =?UTF-8?q?=E7=84=A1=E5=8A=B9=E5=8C=96=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=82=8B=E3=82=BF=E3=82=A4=E3=83=A0=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=81=AE=E3=83=95=E3=82=A9=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=90=E3=83=83=E3=82=AF=20(#4242)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update timeline.vue * Update home.vue --- src/client/app/desktop/views/components/timeline.vue | 10 +++++++--- src/client/app/mobile/views/pages/home.vue | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue index edeb30d9cd..0a91cfb59d 100644 --- a/src/client/app/desktop/views/components/timeline.vue +++ b/src/client/app/desktop/views/components/timeline.vue @@ -65,9 +65,13 @@ export default Vue.extend({ }, created() { - this.$root.getMeta().then(meta => { - this.enableLocalTimeline = !meta.disableLocalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin; - this.enableGlobalTimeline = !meta.disableGlobalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin; + this.$root.getMeta().then((meta: Record) => { + if (!( + this.enableGlobalTimeline = !meta.disableGlobalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin + ) && this.src === 'global') this.src = 'local'; + if (!( + this.enableLocalTimeline = !meta.disableLocalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin + ) && ['local', 'hybrid'].includes(this.src)) this.src = 'home'; }); if (this.$store.state.device.tl) { diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue index 9adf716b32..a663c1da99 100644 --- a/src/client/app/mobile/views/pages/home.vue +++ b/src/client/app/mobile/views/pages/home.vue @@ -112,9 +112,13 @@ export default Vue.extend({ }, created() { - this.$root.getMeta().then(meta => { - this.enableLocalTimeline = !meta.disableLocalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin; - this.enableGlobalTimeline = !meta.disableGlobalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin; + this.$root.getMeta().then((meta: Record) => { + if (!( + this.enableGlobalTimeline = !meta.disableGlobalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin + ) && this.src === 'global') this.src = 'local'; + if (!( + this.enableLocalTimeline = !meta.disableLocalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin + ) && ['local', 'hybrid'].includes(this.src)) this.src = 'home'; }); if (this.$store.state.device.tl) {