mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
Refactor
This commit is contained in:
parent
c7e4462425
commit
aeef2a95d7
1 changed files with 5 additions and 5 deletions
|
@ -42,9 +42,9 @@ export default class MiOS extends EventEmitter {
|
|||
* @param callback A function that call when initialized
|
||||
*/
|
||||
@autobind
|
||||
public async init(_callback) {
|
||||
const callback = () => {
|
||||
_callback();
|
||||
public async init(callback) {
|
||||
const finish = () => {
|
||||
callback();
|
||||
|
||||
this.store.dispatch('instance/fetch').then(() => {
|
||||
// Init service worker
|
||||
|
@ -104,7 +104,7 @@ export default class MiOS extends EventEmitter {
|
|||
this.initStream();
|
||||
|
||||
// Finish init
|
||||
callback();
|
||||
finish();
|
||||
};
|
||||
|
||||
// キャッシュがあったとき
|
||||
|
@ -133,7 +133,7 @@ export default class MiOS extends EventEmitter {
|
|||
this.initStream();
|
||||
|
||||
// Finish init
|
||||
callback();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue