浏览代码

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
 const logger = require("jitsi-meet-logger").getLogger(__filename);
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
  * The modules stores information about the URL used to start the conference and
6
  * The modules stores information about the URL used to start the conference and
68
      */
68
      */
69
     reload() {
69
     reload() {
70
         logger.info("Reloading the conference using URL: " + this.originalURL);
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
 }
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
  * @param {string} url the URL pointing to the location where the user should
29
  * @param {string} url the URL pointing to the location where the user should
28
  * be redirected to.
30
  * be redirected to.
29
  */
31
  */
30
-export function redirect (url) {
32
+export function replace(url) {
31
     window.location.replace(url);
33
     window.location.replace(url);
32
 }
34
 }
33
 
35
 

正在加载...
取消
保存