FIX: Mobile top topic list with a period and a category or tag
This commit is contained in:
parent
5ad6dc01c1
commit
026832fb80
|
@ -29,9 +29,13 @@ export default Component.extend({
|
|||
|
||||
@discourseComputed("filterMode", "category", "noSubcategories")
|
||||
navItems(filterMode, category, noSubcategories) {
|
||||
// we don't want to show the period in the navigation bar since it's in a dropdown
|
||||
if (filterMode.indexOf("top/") === 0) {
|
||||
filterMode = "top";
|
||||
const filterModeParts = filterMode.split("/");
|
||||
if (
|
||||
filterModeParts.length >= 2 &&
|
||||
filterModeParts[filterModeParts.length - 2] === "top"
|
||||
) {
|
||||
filterModeParts.pop();
|
||||
filterMode = filterModeParts.join("/");
|
||||
}
|
||||
|
||||
let params;
|
||||
|
|
|
@ -19,9 +19,15 @@ export default Component.extend({
|
|||
|
||||
@discourseComputed("filterMode", "navItems")
|
||||
selectedNavItem(filterMode, navItems) {
|
||||
if (filterMode.indexOf("top/") === 0) {
|
||||
filterMode = "top";
|
||||
const filterModeParts = filterMode.split("/");
|
||||
if (
|
||||
filterModeParts.length >= 2 &&
|
||||
filterModeParts[filterModeParts.length - 2] === "top"
|
||||
) {
|
||||
filterModeParts.pop();
|
||||
filterMode = filterModeParts.join("/");
|
||||
}
|
||||
|
||||
let item = navItems.find(i => i.active === true);
|
||||
|
||||
item =
|
||||
|
|
Loading…
Reference in New Issue