diff --git a/src/app/pages/chat/chat.page.html b/src/app/pages/chat/chat.page.html index d39bd652d..7a11f5720 100644 --- a/src/app/pages/chat/chat.page.html +++ b/src/app/pages/chat/chat.page.html @@ -118,7 +118,8 @@ (click)="openGroupMessagesPage(group.value.id)" class="item-content flex-grow-1 cursor-pointer">
- {{group.value.name.split('-').join(' ')}} + {{group.value.name.split('-').join(' ')}} + {{group.value.name.split('-').join(' ')}}TT
{{showDateDuration(group._updatedAt)}}
{{countDownDate(group.value.customFields.countDownDate, group.value.id)}}
diff --git a/src/app/pages/chat/chat.page.ts b/src/app/pages/chat/chat.page.ts index 17c9799fa..102a8c7c2 100644 --- a/src/app/pages/chat/chat.page.ts +++ b/src/app/pages/chat/chat.page.ts @@ -32,7 +32,6 @@ import { ThemeService } from 'src/app/services/theme.service' import { DataService } from 'src/app/services/data.service'; import { SqliteService } from 'src/app/services/sqlite.service'; import { StorageService } from 'src/app/services/storage.service'; -import { WebsocketService } from 'src/app/services/websocket.service'; @@ -40,7 +39,6 @@ import { WebsocketService } from 'src/app/services/websocket.service'; selector: 'app-chat', templateUrl: './chat.page.html', styleUrls: ['./chat.page.scss'], - providers: [WebsocketService, ChatService] }) export class ChatPage implements OnInit { diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index b5c8616b7..0407c336a 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -8,7 +8,6 @@ import { environment } from 'src/environments/environment'; import { Storage } from '@ionic/storage'; import { Message } from 'src/app/models/message.model'; import { Observable, Subject } from "rxjs/Rx"; -import { WebsocketService } from './websocket.service'; @Injectable({ providedIn: 'root' @@ -31,7 +30,6 @@ export class ChatService { private authService: AuthService, private storage: Storage, private storageService:StorageService, - private wsService: WebsocketService, ) { this.loggedUserChat = authService.ValidatedUserChat; diff --git a/src/app/services/chat/room.service.ts b/src/app/services/chat/room.service.ts index 54fc6222d..7af0271c0 100644 --- a/src/app/services/chat/room.service.ts +++ b/src/app/services/chat/room.service.ts @@ -13,11 +13,11 @@ export class RoomService { chatUser: ChatUserService[] = [] id = '' - name = '' + name = 'teste' _updatedAt = {} private hasLoadHistory = false duration = '' - + constructor( public WsChatService: WsChatService, @@ -61,7 +61,7 @@ export class RoomService { this.WsChatService.loadHistory(this.id, limit).then((message:any) => { console.log('loadHistory', message) - + message.result.messages.reverse().forEach(element => { console.log('element', element) element = this.fix_updatedAt(element) diff --git a/src/app/services/chat/ws-chat-methods.service.ts b/src/app/services/chat/ws-chat-methods.service.ts index 7b8ab1509..e78524a15 100644 --- a/src/app/services/chat/ws-chat-methods.service.ts +++ b/src/app/services/chat/ws-chat-methods.service.ts @@ -113,7 +113,7 @@ export class WsChatMethodsService { } private isIndividual(roomData) { - return !roomData.fname + return roomData.t == "d"; } }