26 lines
778 B
TypeScript
26 lines
778 B
TypeScript
|
import { Injectable, Inject } from '@angular/core';
|
||
|
import { UCAP_NATIVE_SERVICE, NativeService } from '@ucap-webmessenger/native';
|
||
|
import { Store } from '@ngrx/store';
|
||
|
import { NGXLogger } from 'ngx-logger';
|
||
|
|
||
|
import * as AuthenticationStore from '@app/store/account/authentication';
|
||
|
|
||
|
@Injectable({
|
||
|
providedIn: 'root'
|
||
|
})
|
||
|
export class AppNativeService {
|
||
|
constructor(
|
||
|
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
|
||
|
private store: Store<any>,
|
||
|
private logger: NGXLogger
|
||
|
) {}
|
||
|
|
||
|
subscribe(): void {
|
||
|
this.nativeService.logout().subscribe(() => {
|
||
|
this.store.dispatch(AuthenticationStore.logout());
|
||
|
});
|
||
|
this.nativeService.changeStatus().subscribe(statusCode => {});
|
||
|
this.nativeService.showSetting().subscribe(() => {});
|
||
|
}
|
||
|
}
|