Implement mobile connection resumes
This commit is contained in:
@ -29,6 +29,18 @@ export class App {
|
||||
this.handleUrl(document.URL);
|
||||
}
|
||||
|
||||
close() {
|
||||
if (this.session) this.session.close();
|
||||
}
|
||||
|
||||
sleep() {
|
||||
if (this.session) this.session.sleep();
|
||||
}
|
||||
|
||||
async wakeup() {
|
||||
if (this.session) await this.session.wakeup();
|
||||
}
|
||||
|
||||
setHash(hash: string) {
|
||||
const url = new URL(document.URL);
|
||||
url.hash = hash;
|
||||
@ -244,8 +256,8 @@ export class App {
|
||||
}
|
||||
});
|
||||
|
||||
this.session.subscribe(response => {
|
||||
this.addMessage(response.data.data.message);
|
||||
this.session.subscribe(event => {
|
||||
this.addMessage(event.data.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user