summaryrefslogtreecommitdiff
path: root/src/client/components
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-09 22:00:38 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-09 22:00:38 +0900
commit7813c8a94293de31b2af3a158c7811be70e07197 (patch)
tree45cb678f8e45270e3c8dcf11d8b4ca8717f5c60c /src/client/components
parentお知らせの固定表示 (#5887) (diff)
downloadsharkey-7813c8a94293de31b2af3a158c7811be70e07197.tar.gz
sharkey-7813c8a94293de31b2af3a158c7811be70e07197.tar.bz2
sharkey-7813c8a94293de31b2af3a158c7811be70e07197.zip
Fix #5896
Diffstat (limited to 'src/client/components')
-rw-r--r--src/client/components/timeline.vue17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/client/components/timeline.vue b/src/client/components/timeline.vue
index f5edb18550..15d0dab99d 100644
--- a/src/client/components/timeline.vue
+++ b/src/client/components/timeline.vue
@@ -27,6 +27,7 @@ export default Vue.extend({
data() {
return {
connection: null,
+ connection2: null,
pagination: null,
baseQuery: {
includeMyRenotes: this.$store.state.settings.showMyRenotes,
@@ -40,6 +41,7 @@ export default Vue.extend({
created() {
this.$once('hook:beforeDestroy', () => {
this.connection.dispose();
+ if (this.connection2) this.connection2.dispose();
});
const prepend = note => {
@@ -54,6 +56,12 @@ export default Vue.extend({
(this.$refs.tl as any).reload();
};
+ const onChangeFollowing = () => {
+ if (!this.$refs.tl.backed) {
+ this.$refs.tl.reload();
+ }
+ };
+
let endpoint;
if (this.src == 'antenna') {
@@ -67,13 +75,12 @@ export default Vue.extend({
this.connection.on('note', prepend);
} else if (this.src == 'home') {
endpoint = 'notes/timeline';
- const onChangeFollowing = () => {
- this.fetch();
- };
this.connection = this.$root.stream.useSharedConnection('homeTimeline');
this.connection.on('note', prepend);
- this.connection.on('follow', onChangeFollowing);
- this.connection.on('unfollow', onChangeFollowing);
+
+ this.connection2 = this.$root.stream.useSharedConnection('main');
+ this.connection2.on('follow', onChangeFollowing);
+ this.connection2.on('unfollow', onChangeFollowing);
} else if (this.src == 'local') {
endpoint = 'notes/local-timeline';
this.connection = this.$root.stream.useSharedConnection('localTimeline');