use controllers depending if is mobile

This commit is contained in:
SrGooglo 2022-11-22 16:14:58 +00:00
parent 0df0a1a76c
commit 509d7b3dc2

View File

@ -310,7 +310,14 @@ class App extends React.Component {
window.app.ModalController.open((props) => <Creator {...props} />)
},
openSettings: (goTo) => {
window.app.SidedrawerController.open("Settings", Settings, {
const controller = window.isMobile ? app.DrawerController : app.SidedrawerController
if (!controller) {
console.error("No controller found")
return false
}
controller.open("Settings", Settings, {
props: {
width: "fit-content",
goTo,