瀏覽代碼

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 8 年之前
父節點
當前提交
a8cd4ff12c
共有 2 個文件被更改,包括 6 次插入4 次删除
  1. 2
    2
      modules/URL/ConferenceUrl.js
  2. 4
    2
      modules/util/helpers.js

+ 2
- 2
modules/URL/ConferenceUrl.js 查看文件

@@ -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 查看文件

@@ -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
 

Loading…
取消
儲存