Kaynağa Gözat

Fixes status change from pending to unavailable.

j8
yanas 9 yıl önce
ebeveyn
işleme
51037c2dca
1 değiştirilmiş dosya ile 14 ekleme ve 2 silme
  1. 14
    2
      modules/UI/recording/Recording.js

+ 14
- 2
modules/UI/recording/Recording.js Dosyayı Görüntüle

@@ -209,6 +209,10 @@ var Recording = {
209 209
     },
210 210
 
211 211
     updateRecordingState(recordingState) {
212
+        // If there's no state change, we ignore the update.
213
+        if (this.currentState === recordingState)
214
+            return;
215
+
212 216
         this.setRecordingButtonState(recordingState);
213 217
     },
214 218
 
@@ -227,7 +231,14 @@ var Recording = {
227 231
             moveToCorner(labelSelector, true, 3000);
228 232
             labelSelector
229 233
                 .text(APP.translation.translateString(this.recordingOnKey));
230
-        } else if (recordingState === 'off') {
234
+        } else if (recordingState === 'off'
235
+                    || recordingState === 'unavailable') {
236
+
237
+            // We don't want to do any changes if this is
238
+            // an availability change.
239
+            if (this.currentState === "available"
240
+                || this.currentState === "unavailable")
241
+                return;
231 242
 
232 243
             buttonSelector.removeClass(this.baseClass + " active");
233 244
             buttonSelector.addClass(this.baseClass);
@@ -245,7 +256,8 @@ var Recording = {
245 256
             setTimeout(function(){
246 257
                 $('#recordingLabel').css({display: "none"});
247 258
             }, 5000);
248
-        } else if (recordingState === 'pending') {
259
+        }
260
+        else if (recordingState === 'pending') {
249 261
 
250 262
             buttonSelector.removeClass(this.baseClass + " active");
251 263
             buttonSelector.addClass(this.baseClass);

Loading…
İptal
Kaydet