Skip to content

Commit

Permalink
fix(reddit/tabBar): showing context menu in More
Browse files Browse the repository at this point in the history
Fixes #3136
  • Loading branch information
rxri committed Sep 7, 2024
1 parent 8862426 commit eb8e1f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CustomApps/reddit/OptionsMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const OptionsMenu = react.memo(({ options, onSelect, selected, defaultValue, bol
),
trigger: "click",
action: "toggle",
renderInline: true,
renderInline: false,
},
react.createElement(
"button",
Expand Down
8 changes: 8 additions & 0 deletions CustomApps/reddit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ class Grid extends react.Component {
}

render() {
const expFeatures = JSON.parse(localStorage.getItem("spicetify-exp-features") || "{}");
const isGlobalNav = expFeatures?.enableGlobalNavBar?.value !== "control";
const version = Spicetify.Platform.version.split(".").map((i) => Number.parseInt(i));

const tabBarMargin = {
marginTop: isGlobalNav || (version[0] === 1 && version[1] === 2 && version[2] >= 45) ? "60px" : "0px",
};
return react.createElement(
"section",
{
Expand All @@ -246,6 +253,7 @@ class Grid extends react.Component {
"div",
{
className: "reddit-header",
style: tabBarMargin,
},
react.createElement("h1", null, this.props.title),
react.createElement(SortBox, {
Expand Down

0 comments on commit eb8e1f2

Please sign in to comment.