summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2019-02-14 13:39:42 +0900
committerGitHub <noreply@github.com>2019-02-14 13:39:42 +0900
commitace6419aefbf9811c5a0f203baa83dc682d8e2d6 (patch)
treeb35be9c3435c7946c026a52cf021a355258acb23 /src
parentFix title of robot icon in user.header of desktop view (#4243) (diff)
downloadmisskey-ace6419aefbf9811c5a0f203baa83dc682d8e2d6.tar.gz
misskey-ace6419aefbf9811c5a0f203baa83dc682d8e2d6.tar.bz2
misskey-ace6419aefbf9811c5a0f203baa83dc682d8e2d6.zip
無効化されているタイムラインのフォールバック (#4242)
* Update timeline.vue * Update home.vue
Diffstat (limited to 'src')
-rw-r--r--src/client/app/desktop/views/components/timeline.vue10
-rw-r--r--src/client/app/mobile/views/pages/home.vue10
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<string, any>) => {
+ 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<string, any>) => {
+ 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) {