fix scrolling

This commit is contained in:
tiago.kayaya
2021-08-23 16:31:06 +01:00
parent 276febdf71
commit e0f68c9706
10 changed files with 242 additions and 56 deletions
@@ -36,13 +36,14 @@
</ion-refresher-content>
</ion-refresher>
<div class="messages" #scrollMe>
<div *ngFor="let msg of messages" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
<div *ngFor="let msg of messages; let last = last" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
<div class="title">
<ion-label>{{msg.u.name}}</ion-label>
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
</div>
<div>
<ion-label>{{msg.msg}}</ion-label>
{{last ? scrollToBottom() : ''}}
</div>
</div>
</div>