diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-06 19:22:45 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-06 19:22:45 +0900 |
| commit | b0f989dbacbdbdd091b0d220496d22f47c795576 (patch) | |
| tree | c4af330d8eb11c1d0d5dc0a991409060e9287c6b /src/client/app/common/scripts | |
| parent | Update README.md (diff) | |
| download | sharkey-b0f989dbacbdbdd091b0d220496d22f47c795576.tar.gz sharkey-b0f989dbacbdbdd091b0d220496d22f47c795576.tar.bz2 sharkey-b0f989dbacbdbdd091b0d220496d22f47c795576.zip | |
Deckにウィジェットを置けるように
Diffstat (limited to 'src/client/app/common/scripts')
| -rw-r--r-- | src/client/app/common/scripts/streaming/home.ts | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index a27c55a60d..dd18c70d70 100644 --- a/src/client/app/common/scripts/streaming/home.ts +++ b/src/client/app/common/scripts/streaming/home.ts @@ -58,25 +58,18 @@ export class HomeStream extends Stream { }); this.on('home_updated', x => { - if (x.home) { - os.store.commit('settings/setHome', x.home); - } else { - os.store.commit('settings/setHomeWidget', { - id: x.id, - data: x.data - }); - } + os.store.commit('settings/setHome', x); }); this.on('mobile_home_updated', x => { - if (x.home) { - os.store.commit('settings/setMobileHome', x.home); - } else { - os.store.commit('settings/setMobileHomeWidget', { - id: x.id, - data: x.data - }); - } + os.store.commit('settings/setMobileHome', x); + }); + + this.on('widgetUpdated', x => { + os.store.commit('settings/setWidget', { + id: x.id, + data: x.data + }); }); // トークンが再生成されたとき |