Adding option types 2 (#689)
* Not working, because of wrong API types. * Adding Rust-style Result and Option types. - Fixes #646 * Updating to use new lemmy-js-client with Options.
This commit is contained in:
parent
d41e19f3f1
commit
d905c91e1b
60 changed files with 5883 additions and 4485 deletions
|
@ -1,4 +1,3 @@
|
|||
import { PersonViewSafe, WebSocketJsonResponse } from "lemmy-js-client";
|
||||
import { Observable } from "rxjs";
|
||||
import { share } from "rxjs/operators";
|
||||
import {
|
||||
|
@ -15,9 +14,6 @@ export class WebSocketService {
|
|||
private ws: WS;
|
||||
public subject: Observable<any>;
|
||||
|
||||
public admins: PersonViewSafe[];
|
||||
public banned: PersonViewSafe[];
|
||||
|
||||
private constructor() {
|
||||
let firstConnect = true;
|
||||
|
||||
|
@ -34,7 +30,7 @@ export class WebSocketService {
|
|||
console.log(`Connected to ${wsUri}`);
|
||||
|
||||
if (!firstConnect) {
|
||||
let res: WebSocketJsonResponse<any> = {
|
||||
let res = {
|
||||
reconnect: true,
|
||||
};
|
||||
obs.next(res);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue