From 34a38e8d4d73d8b199c262cfbe8e15099b4c14ca Mon Sep 17 00:00:00 2001 From: kPherox Date: Wed, 24 Apr 2019 06:15:56 +0900 Subject: [PATCH] Add open streaming --- src/components/AddColumn/PublicTimeline.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/AddColumn/PublicTimeline.vue b/src/components/AddColumn/PublicTimeline.vue index 970eb590..f8569c15 100644 --- a/src/components/AddColumn/PublicTimeline.vue +++ b/src/components/AddColumn/PublicTimeline.vue @@ -52,6 +52,13 @@ export default class AddColumn extends Vue { this.pubTL.push({ name: instance, statuses: [] }) this.timeline() + + ipcRenderer.send('open-streaming', instance, 'no-auth') + ipcRenderer.on(`update-${instance}-no-auth`, (_: Event, status: Status) => { + this.pubTL.filter(tl => tl.name === instance).forEach(function (tl) { + tl.statuses.unshift(status) + }) + }) } public timeline() { @@ -60,7 +67,7 @@ export default class AddColumn extends Vue { tl.statuses = statuses }) ipcRenderer.send('no-auth-timeline', tl.name) - }); + }) } } =