This commit is contained in:
Peter Maquiran
2022-01-12 12:44:51 +01:00
parent 2f0935b0d3
commit 45284fc1a6
17 changed files with 187 additions and 302 deletions
+3 -3
View File
@@ -4,7 +4,7 @@
<ion-content class="height-100 container-wrapper">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="wsChatService.loadingWholeList"></ion-progress-bar>
<ion-progress-bar type="indeterminate" *ngIf="wsChatMethodsService.loadingWholeList"></ion-progress-bar>
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
@@ -45,7 +45,7 @@
<ion-list *ngSwitchCase="'Contactos'">
<ion-item-sliding>
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
*ngFor="let room of wsChatService.individual | keyvalue"
*ngFor="let room of wsChatMethodsService.dm | keyvalue"
[class.item-active]="room.value.id == idSelected">
<div class="item-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
@@ -86,7 +86,7 @@
</div>
</div>
</ion-item-sliding>
<ion-item-sliding *ngIf=" wsChatService.individualCount < 1">
<ion-item-sliding *ngIf=" wsChatMethodsService.dmCount < 1">
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-chat-grey.svg"></ion-icon></div>
<div class="item-content flex-grow-1 cursor-pointer">
+2 -2
View File
@@ -12,7 +12,7 @@ import {
import { ModalController, Platform } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { wsChatService as wsChatService} from 'src/app/services/chat/chat.service'
import { wsChatMethodsService as wsChatMethodsService} from 'src/app/services/chat/chat.service'
import { GroupMessagesPage } from './group-messages/group-messages.page';
import { ContactsPage } from './messages/contacts/contacts.page';
import { MessagesPage } from './messages/messages.page';
@@ -125,7 +125,7 @@ export class ChatPage implements OnInit {
private sqlservice: SqliteService,
private platform: Platform,
private storageservice: StorageService,
public wsChatService: wsChatService
public wsChatMethodsService: wsChatMethodsService
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
@@ -49,7 +49,7 @@
</ion-refresher-content>
</ion-refresher> -->
<div (click)="handleClick()" class="messages" #scrollMe>
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatService.getRoom(this.roomId).massages; let last = last"
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getRoom(this.roomId).massages; let last = last"
[class.messages-list-item-wrapper-active]="msg._id == selectedMsgId" >
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)" *ngIf="msg.msg !=''">
<div class="title">
+3 -3
View File
@@ -28,7 +28,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { elementAt } from 'rxjs-compat/operator/elementAt';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { wsChatService as wsChatService} from 'src/app/services/chat/chat.service'
import { wsChatMethodsService } from 'src/app/services/chat/chat.service'
const IMAGE_DIR = 'stored-images';
@@ -96,7 +96,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
private changeDetectorRef: ChangeDetectorRef,
private platform: Platform,
private sqlservice: SqliteService,
public wsChatService: wsChatService
public wsChatMethodsService: wsChatMethodsService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.roomId = this.navParams.get('roomId');
@@ -108,7 +108,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
};
this.wsChatService.getRoom(this.roomId).loadHistory()
this.wsChatMethodsService.getRoom(this.roomId).loadHistory()
}