diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-12 06:18:55 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-12 06:18:55 +0900 |
| commit | cca9963a9ab17fa3f10dab845ea774c72101d1ba (patch) | |
| tree | ca36d991061aeda8f269a61c66e57ad4734354d3 /src/client/app/common | |
| parent | Clean up (diff) | |
| download | misskey-cca9963a9ab17fa3f10dab845ea774c72101d1ba.tar.gz misskey-cca9963a9ab17fa3f10dab845ea774c72101d1ba.tar.bz2 misskey-cca9963a9ab17fa3f10dab845ea774c72101d1ba.zip | |
:v:
Diffstat (limited to 'src/client/app/common')
| -rw-r--r-- | src/client/app/common/mios.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts index 5e0c7d2f3b..a09af799be 100644 --- a/src/client/app/common/mios.ts +++ b/src/client/app/common/mios.ts @@ -444,7 +444,7 @@ export default class MiOS extends EventEmitter { // Append a credential if (this.isSignedIn) (data as any).i = this.i.token; - const viaStream = localStorage.getItem('enableExperimental') == 'true'; + const viaStream = localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true; return new Promise((resolve, reject) => { if (viaStream) { @@ -452,6 +452,8 @@ export default class MiOS extends EventEmitter { const id = Math.random().toString(); stream.once(`api-res:${id}`, res => { + if (--pending === 0) spinner.parentNode.removeChild(spinner); + if (res.res) { resolve(res.res); } else { @@ -503,7 +505,7 @@ export default class MiOS extends EventEmitter { reject(body.error); } }).catch(reject); - /*}*/ + } }); } |