mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve loader
This commit is contained in:
@@ -4,6 +4,7 @@ import { Status } from 'src/app/models/chat/status.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
|
||||
import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/messages-options.page';
|
||||
import { ProfileComponent } from '../../headers/header-no-search/profile/profile.page';
|
||||
@@ -37,6 +38,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
private authService: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private alertService: AlertService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
/* this.dm = this.navParams.get('dm'); */
|
||||
}
|
||||
@@ -84,9 +86,15 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
console.log(this.roomId);
|
||||
}
|
||||
scrollToBottom(): void {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
} catch(err) { }
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
} catch(err) { }
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
loadMoreMessages(ev:any){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user