зеркало из https://github.com/nextcloud/spreed.git
Fix self avatar size for guests
The avatars were not usually 128px width and height because "imageplaceholder" uses the height of the element and, if it is not available (for example, because the element was never shown), it uses the given size. In most cases the ChatView was rendered after being shown, but in some special cases it could be rendered before being shown and then shown, which caused the large avatars. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Родитель
3ee8674725
Коммит
54b81ef15d
|
@ -250,7 +250,7 @@
|
|||
} else {
|
||||
var displayName = this.getOption('guestNameModel').get('nick');
|
||||
var customName = displayName !== t('spreed', 'Guest') ? displayName : '';
|
||||
this.$el.find('.avatar').imageplaceholder(customName ? customName.substr(0, 1) : '?', customName, 128);
|
||||
this.$el.find('.avatar').imageplaceholder(customName ? customName.substr(0, 1) : '?', customName, 32);
|
||||
this.$el.find('.avatar').css('background-color', '#b9b9b9');
|
||||
this.showChildView('guestName', this._guestNameEditableTextLabel, { replaceElement: true, allowMissingEl: true } );
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче