diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-07-11 14:06:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-11 14:06:07 +0900 |
| commit | 58fdeb50f34ff9f66cf201583924911c2ac65205 (patch) | |
| tree | d462b3a20d79c6ed7e15e7961aacfe54cb4265a9 /src/client/app/common/scripts | |
| parent | oops (diff) | |
| parent | wip (diff) | |
| download | misskey-58fdeb50f34ff9f66cf201583924911c2ac65205.tar.gz misskey-58fdeb50f34ff9f66cf201583924911c2ac65205.tar.bz2 misskey-58fdeb50f34ff9f66cf201583924911c2ac65205.zip | |
Merge pull request #1879 from syuilo/hybrid-tl
Hybrid tl
Diffstat (limited to 'src/client/app/common/scripts')
| -rw-r--r-- | src/client/app/common/scripts/streaming/hybrid-timeline.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/client/app/common/scripts/streaming/hybrid-timeline.ts b/src/client/app/common/scripts/streaming/hybrid-timeline.ts new file mode 100644 index 0000000000..cd290797c4 --- /dev/null +++ b/src/client/app/common/scripts/streaming/hybrid-timeline.ts @@ -0,0 +1,34 @@ +import Stream from './stream'; +import StreamManager from './stream-manager'; +import MiOS from '../../../mios'; + +/** + * Hybrid timeline stream connection + */ +export class HybridTimelineStream extends Stream { + constructor(os: MiOS, me) { + super(os, 'hybrid-timeline', { + i: me.token + }); + } +} + +export class HybridTimelineStreamManager extends StreamManager<HybridTimelineStream> { + private me; + private os: MiOS; + + constructor(os: MiOS, me) { + super(); + + this.me = me; + this.os = os; + } + + public getConnection() { + if (this.connection == null) { + this.connection = new HybridTimelineStream(this.os, this.me); + } + + return this.connection; + } +} |