Parcourir la source

1, not 2 names for 1 and the same abstraction

window.location calls it reload so util/helpers shouldn't call it
redirect because UI/util/UIUtil has it is own redirect which is the
assign of window.location.
j8
Lyubomir Marinov il y a 8 ans
Parent
révision
a8cd4ff12c
2 fichiers modifiés avec 6 ajouts et 4 suppressions
  1. 2
    2
      modules/URL/ConferenceUrl.js
  2. 4
    2
      modules/util/helpers.js

+ 2
- 2
modules/URL/ConferenceUrl.js Voir le fichier

@@ -1,6 +1,6 @@
1 1
 const logger = require("jitsi-meet-logger").getLogger(__filename);
2 2
 
3
-import { redirect } from '../util/helpers';
3
+import { replace } from '../util/helpers';
4 4
 
5 5
 /**
6 6
  * The modules stores information about the URL used to start the conference and
@@ -68,6 +68,6 @@ export default class ConferenceUrl {
68 68
      */
69 69
     reload() {
70 70
         logger.info("Reloading the conference using URL: " + this.originalURL);
71
-        redirect(this.originalURL);
71
+        replace(this.originalURL);
72 72
     }
73 73
 }

+ 4
- 2
modules/util/helpers.js Voir le fichier

@@ -23,11 +23,13 @@ export function reload () {
23 23
 }
24 24
 
25 25
 /**
26
- * Redirects to new URL.
26
+ * Redirects to a specific new URL by replacing the current location (in the
27
+ * history).
28
+ *
27 29
  * @param {string} url the URL pointing to the location where the user should
28 30
  * be redirected to.
29 31
  */
30
-export function redirect (url) {
32
+export function replace(url) {
31 33
     window.location.replace(url);
32 34
 }
33 35
 

Chargement…
Annuler
Enregistrer