Commit da381b1b authored by ioedeveloper's avatar ioedeveloper

Move loading event to preInit

parent 968793c9
...@@ -58,7 +58,7 @@ module.exports = class RemixDProvider { ...@@ -58,7 +58,7 @@ module.exports = class RemixDProvider {
} }
preInit () { preInit () {
this._registerEvent() this.event.trigger('loading')
} }
init (cb) { init (cb) {
......
...@@ -95,7 +95,7 @@ export class RemixdHandle extends WebsocketPlugin { ...@@ -95,7 +95,7 @@ export class RemixdHandle extends WebsocketPlugin {
label: 'Connect', label: 'Connect',
fn: () => { fn: () => {
try { try {
this.locahostProvider.event.trigger('loading') this.locahostProvider.preInit()
super.activate() super.activate()
setTimeout(() => { setTimeout(() => {
if (!this.socket || (this.socket && this.socket.readyState === 3)) { // 3 means connection closed if (!this.socket || (this.socket && this.socket.readyState === 3)) { // 3 means connection closed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment