From eb8e1f2ca87e7a621b497123efa7a0f24d552fe6 Mon Sep 17 00:00:00 2001 From: ririxi Date: Sat, 7 Sep 2024 22:13:20 +0200 Subject: [PATCH] fix(reddit/tabBar): showing context menu in `More` Fixes #3136 --- CustomApps/reddit/OptionsMenu.js | 2 +- CustomApps/reddit/index.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CustomApps/reddit/OptionsMenu.js b/CustomApps/reddit/OptionsMenu.js index 5f4ad345be..7e579393b7 100644 --- a/CustomApps/reddit/OptionsMenu.js +++ b/CustomApps/reddit/OptionsMenu.js @@ -55,7 +55,7 @@ const OptionsMenu = react.memo(({ options, onSelect, selected, defaultValue, bol ), trigger: "click", action: "toggle", - renderInline: true, + renderInline: false, }, react.createElement( "button", diff --git a/CustomApps/reddit/index.js b/CustomApps/reddit/index.js index b5e0d7ef9b..1578c9c1f2 100644 --- a/CustomApps/reddit/index.js +++ b/CustomApps/reddit/index.js @@ -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", { @@ -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, {