Use single WebAPI instance across the app
This commit is contained in:
parent
79633a9e7b
commit
fdec47d637
19 changed files with 218 additions and 308 deletions
|
@ -439,14 +439,11 @@ class Message {
|
|||
}
|
||||
|
||||
export default class MessageSender {
|
||||
server: WebAPIType;
|
||||
|
||||
pendingMessages: {
|
||||
[id: string]: PQueue;
|
||||
};
|
||||
|
||||
constructor(username: string, password: string) {
|
||||
this.server = window.WebAPI.connect({ username, password });
|
||||
constructor(public readonly server: WebAPIType) {
|
||||
this.pendingMessages = {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue