mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
js: Purge pm_conversations module from window.
All the changes are done using a script followed by updates to Node tests and running eslint and prettier to fix formatting issues.
This commit is contained in:
committed by
Anders Kaseorg
parent
305a1ac57d
commit
d774bba1b9
@@ -192,7 +192,6 @@
|
|||||||
"panels": false,
|
"panels": false,
|
||||||
"pill_typeahead": false,
|
"pill_typeahead": false,
|
||||||
"people": false,
|
"people": false,
|
||||||
"pm_conversations": false,
|
|
||||||
"pm_list": false,
|
"pm_list": false,
|
||||||
"pm_list_dom": false,
|
"pm_list_dom": false,
|
||||||
"pointer": false,
|
"pointer": false,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ zrequire("presence");
|
|||||||
zrequire("buddy_data");
|
zrequire("buddy_data");
|
||||||
zrequire("hash_util");
|
zrequire("hash_util");
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
zrequire("pm_conversations");
|
const pm_conversations = zrequire("pm_conversations");
|
||||||
zrequire("pm_list");
|
zrequire("pm_list");
|
||||||
|
|
||||||
const alice = {
|
const alice = {
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
set_global("pm_conversations", {
|
const pm_conversations = zrequire("pm_conversations");
|
||||||
recent: {},
|
pm_conversations.recent = {};
|
||||||
});
|
|
||||||
|
|
||||||
zrequire("muting");
|
zrequire("muting");
|
||||||
zrequire("unread");
|
zrequire("unread");
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ set_global("page_params", {realm_is_zephyr_mirror_realm: false});
|
|||||||
set_global("md5", (s) => "md5-" + s);
|
set_global("md5", (s) => "md5-" + s);
|
||||||
|
|
||||||
const settings_config = zrequire("settings_config");
|
const settings_config = zrequire("settings_config");
|
||||||
|
const pm_conversations = zrequire("pm_conversations");
|
||||||
|
|
||||||
page_params.realm_email_address_visibility =
|
page_params.realm_email_address_visibility =
|
||||||
settings_config.email_address_visibility_values.admins_only.code;
|
settings_config.email_address_visibility_values.admins_only.code;
|
||||||
|
|
||||||
zrequire("recent_senders");
|
zrequire("recent_senders");
|
||||||
zrequire("pm_conversations");
|
|
||||||
zrequire("people");
|
zrequire("people");
|
||||||
zrequire("stream_data");
|
zrequire("stream_data");
|
||||||
zrequire("narrow");
|
zrequire("narrow");
|
||||||
@@ -241,10 +242,10 @@ run_test("sort_recipients", () => {
|
|||||||
stream_data.update_calculated_fields(linux_sub);
|
stream_data.update_calculated_fields(linux_sub);
|
||||||
|
|
||||||
// For splitting based on whether a PM was sent
|
// For splitting based on whether a PM was sent
|
||||||
global.pm_conversations.set_partner(5);
|
pm_conversations.set_partner(5);
|
||||||
global.pm_conversations.set_partner(6);
|
pm_conversations.set_partner(6);
|
||||||
global.pm_conversations.set_partner(2);
|
pm_conversations.set_partner(2);
|
||||||
global.pm_conversations.set_partner(7);
|
pm_conversations.set_partner(7);
|
||||||
|
|
||||||
// For splitting based on recency
|
// For splitting based on recency
|
||||||
global.recent_senders.process_message_for_senders({
|
global.recent_senders.process_message_for_senders({
|
||||||
|
|||||||
1
static/js/global.d.ts
vendored
1
static/js/global.d.ts
vendored
@@ -90,7 +90,6 @@ declare let page_params: any;
|
|||||||
declare let panels: any;
|
declare let panels: any;
|
||||||
declare let people: any;
|
declare let people: any;
|
||||||
declare let pill_typeahead: any;
|
declare let pill_typeahead: any;
|
||||||
declare let pm_conversations: any;
|
|
||||||
declare let pm_list: any;
|
declare let pm_list: any;
|
||||||
declare let pointer: any;
|
declare let pointer: any;
|
||||||
declare let poll_widget: any;
|
declare let poll_widget: any;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
const pm_conversations = require("./pm_conversations");
|
||||||
const util = require("./util");
|
const util = require("./util");
|
||||||
|
|
||||||
const stored_messages = new Map();
|
const stored_messages = new Map();
|
||||||
|
|||||||
@@ -77,5 +77,3 @@ class RecentPrivateMessages {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.recent = new RecentPrivateMessages();
|
exports.recent = new RecentPrivateMessages();
|
||||||
|
|
||||||
window.pm_conversations = exports;
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
const pm_conversations = require("./pm_conversations");
|
||||||
|
|
||||||
let prior_dom;
|
let prior_dom;
|
||||||
let private_messages_open = false;
|
let private_messages_open = false;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
const pm_conversations = require("./pm_conversations");
|
||||||
|
|
||||||
exports.sub_list_generator = function (lst, lower, upper) {
|
exports.sub_list_generator = function (lst, lower, upper) {
|
||||||
// lower/upper has Python range semantics so if you pass
|
// lower/upper has Python range semantics so if you pass
|
||||||
// in lower=5 and upper=8, you get elements 5/6/7
|
// in lower=5 and upper=8, you get elements 5/6/7
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ const emoji = require("../shared/js/emoji");
|
|||||||
const typeahead = require("../shared/js/typeahead");
|
const typeahead = require("../shared/js/typeahead");
|
||||||
const render_typeahead_list_item = require("../templates/typeahead_list_item.hbs");
|
const render_typeahead_list_item = require("../templates/typeahead_list_item.hbs");
|
||||||
|
|
||||||
|
const pm_conversations = require("./pm_conversations");
|
||||||
const settings_data = require("./settings_data");
|
const settings_data = require("./settings_data");
|
||||||
const util = require("./util");
|
const util = require("./util");
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ const render_edit_content_button = require("../templates/edit_content_button.hbs
|
|||||||
|
|
||||||
const emojisets = require("./emojisets");
|
const emojisets = require("./emojisets");
|
||||||
const markdown_config = require("./markdown_config");
|
const markdown_config = require("./markdown_config");
|
||||||
|
const pm_conversations = require("./pm_conversations");
|
||||||
|
|
||||||
// This is where most of our initialization takes place.
|
// This is where most of our initialization takes place.
|
||||||
// TODO: Organize it a lot better. In particular, move bigger
|
// TODO: Organize it a lot better. In particular, move bigger
|
||||||
|
|||||||
Reference in New Issue
Block a user