зеркало из https://github.com/nextcloud/spreed.git
Use an implicit attribute to store whether the hint was displayed or not
As it is a boolean flag just set once and only needed when the current user is a guest an implicit attribute added dynamically is now used instead of an explicit attribute; "_" was prepended to the name too to mark it as "private". Note that in the embedded Talk UI there was no explicit attribute, so the condition would have never passed and the hint would have never been shown. However, as the embedded Talk UI is currently not used with guests it was not an issue. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Родитель
a9a1125b26
Коммит
c9299b9b81
|
@ -76,7 +76,6 @@
|
|||
_participants: null,
|
||||
/** @property {OCA.SpreedMe.Views.ParticipantView} _participantsView */
|
||||
_participantsView: null,
|
||||
displayedGuestNameHint: false,
|
||||
fullscreenDisabled: true,
|
||||
_searchTerm: '',
|
||||
guestNick: null,
|
||||
|
@ -781,9 +780,9 @@
|
|||
var guestName = localStorage.getItem("nick");
|
||||
this._localVideoView.setAvatar(userId, guestName);
|
||||
|
||||
if (!userId && this.displayedGuestNameHint === false) {
|
||||
if (!userId && !this._displayedGuestNameHint) {
|
||||
OC.Notification.showTemporary(t('spreed', 'Set your name in the chat window so other participants can identify you better.'));
|
||||
this.displayedGuestNameHint = true;
|
||||
this._displayedGuestNameHint = true;
|
||||
}
|
||||
|
||||
avatarContainer.removeClass('hidden');
|
||||
|
|
|
@ -226,9 +226,9 @@
|
|||
var guestName = localStorage.getItem("nick");
|
||||
this._localVideoView.setAvatar(userId, guestName);
|
||||
|
||||
if (!userId && this.displayedGuestNameHint === false) {
|
||||
if (!userId && !this._displayedGuestNameHint) {
|
||||
OC.Notification.showTemporary(t('spreed', 'Set your name in the chat window so other participants can identify you better.'));
|
||||
this.displayedGuestNameHint = true;
|
||||
this._displayedGuestNameHint = true;
|
||||
}
|
||||
|
||||
avatarContainer.removeClass('hidden');
|
||||
|
|
Загрузка…
Ссылка в новой задаче