mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: removes various assignments and superfluous params (#9699)
This commit is contained in:
parent
9d172eeaa5
commit
00a038d646
@ -452,14 +452,13 @@ const TopicTrackingState = EmberObject.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let categoryId = category ? get(category, "id") : null;
|
let categoryId = category ? get(category, "id") : null;
|
||||||
let categoryName = category ? get(category, "name") : null;
|
|
||||||
|
|
||||||
if (name === "new") {
|
if (name === "new") {
|
||||||
return this.countNew(categoryId);
|
return this.countNew(categoryId);
|
||||||
} else if (name === "unread") {
|
} else if (name === "unread") {
|
||||||
return this.countUnread(categoryId);
|
return this.countUnread(categoryId);
|
||||||
} else {
|
} else {
|
||||||
categoryName = name.split("/")[1];
|
const categoryName = name.split("/")[1];
|
||||||
if (categoryName) {
|
if (categoryName) {
|
||||||
return this.countCategory(categoryId);
|
return this.countCategory(categoryId);
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,6 @@ I18n.toNumber = function(number, options) {
|
|||||||
.toFixed(options.precision)
|
.toFixed(options.precision)
|
||||||
.toString(),
|
.toString(),
|
||||||
parts = string.split(this.SEPARATOR),
|
parts = string.split(this.SEPARATOR),
|
||||||
precision,
|
|
||||||
buffer = [],
|
buffer = [],
|
||||||
formattedNumber;
|
formattedNumber;
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ export function setup(helper) {
|
|||||||
token = state.push("text", "", 0);
|
token = state.push("text", "", 0);
|
||||||
token.content = content;
|
token.content = content;
|
||||||
|
|
||||||
token = state.push("link_close", "a", -1);
|
state.push("link_close", "a", -1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -66,7 +66,7 @@ function rule(state, startLine, endLine) {
|
|||||||
token.map = [startLine, state.line];
|
token.map = [startLine, state.line];
|
||||||
token.children = [];
|
token.children = [];
|
||||||
|
|
||||||
token = state.push("paragraph_close", "p", -1);
|
state.push("paragraph_close", "p", -1);
|
||||||
state.parentType = oldParentType;
|
state.parentType = oldParentType;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -78,7 +78,7 @@ function paragraph(state, startLine /*, endLine*/) {
|
|||||||
// CUSTOM
|
// CUSTOM
|
||||||
token.leading_space = hasLeadingSpace;
|
token.leading_space = hasLeadingSpace;
|
||||||
|
|
||||||
token = state.push("paragraph_close", "p", -1);
|
state.push("paragraph_close", "p", -1);
|
||||||
|
|
||||||
state.parentType = oldParentType;
|
state.parentType = oldParentType;
|
||||||
return true;
|
return true;
|
||||||
|
@ -78,7 +78,7 @@ function loadNext(ajax) {
|
|||||||
let $html = $(html);
|
let $html = $(html);
|
||||||
setLocalCache(normalize(url), $html);
|
setLocalCache(normalize(url), $html);
|
||||||
$elem.replaceWith($html);
|
$elem.replaceWith($html);
|
||||||
applySquareGenericOnebox($html, normalize(url));
|
applySquareGenericOnebox($html);
|
||||||
},
|
},
|
||||||
result => {
|
result => {
|
||||||
if (result && result.jqXHR && result.jqXHR.status === 429) {
|
if (result && result.jqXHR && result.jqXHR.status === 429) {
|
||||||
|
Loading…
Reference in New Issue
Block a user