MOBILE-3320 messages: Fix undefined on discussion 3.4

main
Pau Ferrer Ocaña 2021-06-01 12:04:01 +02:00
parent 94205791b5
commit a8021bdf63
4 changed files with 13 additions and 6 deletions

View File

@ -92,12 +92,16 @@
[@coreSlideInOut]="message.useridfrom == currentUserId ? '' : 'fromLeft'">
<ion-label>
<!-- User data. -->
<div class="item-heading addon-message-user" [attr.aria-label]="message.useridfrom == currentUserId ?
('addon.messages.you' | translate) : members[message.useridfrom].fullname">
<div *ngIf="message.showUserData" class="item-heading addon-message-user">
<core-user-avatar slot="start" [user]="members[message.useridfrom]" [linkProfile]="false"
*ngIf="message.showUserData"></core-user-avatar>
<div *ngIf="message.showUserData">{{ members[message.useridfrom].fullname }}</div>
aria-hidden="true">
</core-user-avatar>
{{ members[message.useridfrom].fullname }}
</div>
<div *ngIf="!message.showUserData" class="sr-only">
{{ message.useridfrom == currentUserId
? ('addon.messages.you' | translate)
: members[message.useridfrom].fullname }}
</div>
<!-- Some messages have <p> and some others don't. Add a <p> so they all have same styles. -->

View File

@ -250,6 +250,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
this.title = user.fullname;
}
this.conversationImage = user.profileimageurl;
this.members[user.id] = <AddonMessagesConversationMember>user;
return;
}).catch(() => {

View File

@ -19,7 +19,7 @@
<core-search-box *ngIf="search.enabled" (onSubmit)="searchMessage($event)" (onClear)="clearSearch()"
[placeholder]=" 'addon.messages.message' | translate" autocorrect="off" spellcheck="false" lengthCheck="2"
[disabled]="!loaded" searchArea="AddonMessagesDiscussions"></core-search-box>
[disabled]="!loaded" searchArea="AddonMessagesDiscussions" [autoFocus]="false"></core-search-box>
<core-loading [hideUntil]="loaded" [message]="loadingMessage">

View File

@ -185,6 +185,8 @@ ion-header ion-toolbar {
// Ionic icon.
ion-icon {
position: relative;
&.icon-slash::after,
&.icon-backslash::after {
content: " ";