Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-12-06 07:59:22 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-12-06 07:59:22 +0300
commit864f6ee8b8c85bce730a1541ba7cf4c0cc66e494 (patch)
tree35190dfae46f255c90fe298e74dc0f9822665ea7
parenta0625815a7bf5c0bec7f26f936023d2fdaeaa9a8 (diff)
Show notification about guest name when joining a room
This is a more appropriate place than the LocalVideoView, which currently happened to work as expected just due to the initialization order of the view and the local media. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--js/app.js3
-rw-r--r--js/embedded.js3
-rw-r--r--js/views/localvideoview.js5
3 files changed, 6 insertions, 5 deletions
diff --git a/js/app.js b/js/app.js
index 098d291fd..de848b1c4 100644
--- a/js/app.js
+++ b/js/app.js
@@ -688,6 +688,9 @@
if (this.pendingNickChange) {
this.setGuestName(this.pendingNickChange);
delete this.pendingNickChange;
+ } else if (!OCA.Talk.getCurrentUser().uid && !this._localStorageModel.get('nick') && !this._displayedGuestNameHint) {
+ OC.Notification.showTemporary(t('spreed', 'Set your name in the chat window so other participants can identify you better.'));
+ this._displayedGuestNameHint = true;
}
}.bind(this));
diff --git a/js/embedded.js b/js/embedded.js
index edea8588f..fa8d22411 100644
--- a/js/embedded.js
+++ b/js/embedded.js
@@ -106,6 +106,9 @@
if (this.pendingNickChange) {
this.setGuestName(this.pendingNickChange);
delete this.pendingNickChange;
+ } else if (!OCA.Talk.getCurrentUser().uid && !this._localStorageModel.get('nick') && !this._displayedGuestNameHint) {
+ OC.Notification.showTemporary(t('spreed', 'Set your name in the chat window so other participants can identify you better.'));
+ this._displayedGuestNameHint = true;
}
}.bind(this));
diff --git a/js/views/localvideoview.js b/js/views/localvideoview.js
index cd8309368..20e9d2adf 100644
--- a/js/views/localvideoview.js
+++ b/js/views/localvideoview.js
@@ -107,11 +107,6 @@
var guestName = localStorage.getItem("nick");
this.setAvatar(userId, guestName);
- 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.getUI('avatarContainer').removeClass('hidden');
this.getUI('video').addClass('hidden');
},