mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add
This commit is contained in:
@@ -8,6 +8,7 @@ import { Rooms, Update as room } from 'src/app/models/chatMethod';
|
|||||||
import { Storage } from '@ionic/storage';
|
import { Storage } from '@ionic/storage';
|
||||||
import { Platform } from '@ionic/angular';
|
import { Platform } from '@ionic/angular';
|
||||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||||
|
import { ChatService } from 'src/app/services/chat.service';
|
||||||
import { NativeNotificationService } from 'src/app/services/native-notification.service';
|
import { NativeNotificationService } from 'src/app/services/native-notification.service';
|
||||||
import { SortService } from '../functions/sort.service';
|
import { SortService } from '../functions/sort.service';
|
||||||
import { chatUser } from 'src/app/models/chatMethod';
|
import { chatUser } from 'src/app/models/chatMethod';
|
||||||
@@ -39,7 +40,8 @@ export class WsChatMethodsService {
|
|||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private sqlservice: SqliteService,
|
private sqlservice: SqliteService,
|
||||||
private NativeNotificationService: NativeNotificationService,
|
private NativeNotificationService: NativeNotificationService,
|
||||||
private sortService: SortService
|
private sortService: SortService,
|
||||||
|
private ChatService: ChatService
|
||||||
) {
|
) {
|
||||||
(async()=>{
|
(async()=>{
|
||||||
await this.getAllRooms();
|
await this.getAllRooms();
|
||||||
@@ -314,21 +316,21 @@ export class WsChatMethodsService {
|
|||||||
|
|
||||||
async getUser() {
|
async getUser() {
|
||||||
|
|
||||||
// let _res = await this.chatService.getAllUsers().toPromise()
|
let _res = await this.ChatService.getAllUsers().toPromise()
|
||||||
|
|
||||||
// let user = _res['users'].filter(data => data.username != SessionStore.user.RochetChatUser);
|
let user = _res['users'].filter(data => data.username != SessionStore.user.RochetChatUser);
|
||||||
|
|
||||||
// user = user.sort((a,b) => {
|
user = user.sort((a,b) => {
|
||||||
// if(a.name < b.name) {
|
if(a.name < b.name) {
|
||||||
// return -1;
|
return -1;
|
||||||
// }
|
}
|
||||||
// if(a.name > b.name) {
|
if(a.name > b.name) {
|
||||||
// return 1;
|
return 1;
|
||||||
// }
|
}
|
||||||
// return 0;
|
return 0;
|
||||||
// });
|
});
|
||||||
|
|
||||||
// this.users = user
|
this.users = user
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user