mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 15:34:13 +00:00 
			
		
		
		
	Fix #5914
This commit is contained in:
		
							parent
							
								
									b587fefe44
								
							
						
					
					
						commit
						f65e27c07c
					
				
					 1 changed files with 10 additions and 6 deletions
				
			
		| 
						 | 
					@ -42,7 +42,16 @@ export default class MiOS extends EventEmitter {
 | 
				
			||||||
	 * @param callback A function that call when initialized
 | 
						 * @param callback A function that call when initialized
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	@autobind
 | 
						@autobind
 | 
				
			||||||
	public async init(callback) {
 | 
						public async init(_callback) {
 | 
				
			||||||
 | 
							const callback = () => {
 | 
				
			||||||
 | 
								_callback();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								this.store.dispatch('instance/fetch').then(() => {
 | 
				
			||||||
 | 
									// Init service worker
 | 
				
			||||||
 | 
									if (this.store.state.instance.meta.swPublickey) this.registerSw(this.store.state.instance.meta.swPublickey);
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.store = initStore(this);
 | 
							this.store = initStore(this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// ユーザーをフェッチしてコールバックする
 | 
							// ユーザーをフェッチしてコールバックする
 | 
				
			||||||
| 
						 | 
					@ -96,11 +105,6 @@ export default class MiOS extends EventEmitter {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// Finish init
 | 
								// Finish init
 | 
				
			||||||
			callback();
 | 
								callback();
 | 
				
			||||||
 | 
					 | 
				
			||||||
			this.store.dispatch('instance/fetch').then(() => {
 | 
					 | 
				
			||||||
				// Init service worker
 | 
					 | 
				
			||||||
				if (this.store.state.instance.meta.swPublickey) this.registerSw(this.store.state.instance.meta.swPublickey);
 | 
					 | 
				
			||||||
			});
 | 
					 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// キャッシュがあったとき
 | 
							// キャッシュがあったとき
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue