mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
improve chat remove loop
This commit is contained in:
@@ -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 messages; let last = last"
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of ChatServiceGPR.getRoom(this.roomId).mmm; 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">
|
||||
|
||||
@@ -28,6 +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 { ChatService as ChatServiceGPR} from 'src/app/services/chat/chat.service'
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
@@ -94,7 +95,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
public ThemeService: ThemeService,
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private platform: Platform,
|
||||
private sqlservice: SqliteService
|
||||
private sqlservice: SqliteService,
|
||||
public ChatServiceGPR: ChatServiceGPR
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
@@ -105,10 +107,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
};
|
||||
|
||||
this.ChatServiceGPR.getRoom(this.roomId).loadHistory()
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.load();
|
||||
//this.load();
|
||||
this.setStatus('online');
|
||||
|
||||
//this.loadFiles();
|
||||
|
||||
Reference in New Issue
Block a user