Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Is mobile based on media query and can large tablets be treated differently from small phones? #5

Open
owldown opened this issue Feb 8, 2022 · 3 comments

Comments

@owldown
Copy link

owldown commented Feb 8, 2022

I use Obsidian on a 27-inch 5k iMac, a 12.9 inch iPad (in landscape orientation), and an iPhone. The iPad and iPhone are both "mobile", but are very different in size and therefore different in terms of what theme would be best. I'd like some way to tell the plug-in "hey actually my iPad is big enough that I'd like to use the same theme that's on the desktop and only the phone should have the alternate theme". I'm not sure if this plugin is detecting mobile based on screen-size or some flag in the app itself, so I don't yet have an idea for implementing this.

Even more advanced, I'd like to have to way of choosing three themes, one for desktop, one for iPad, and one for iPhone.

@selfire1
Copy link
Owner

selfire1 commented Feb 9, 2022

Hi! That's a great suggestion. I implemented a setting in 0.2.0. Would you mind updating through BRAT and seeing if it works as expected?

@owldown
Copy link
Author

owldown commented Feb 10, 2022

Updated to 0.2.0 and yes, I can select three different themes (desktop/tablet/mobile) and they seem to be working correctly on the intended devices from which I choose them!

But - here is what isn't working: If I open Obsidian on my iPad and choose a theme for Tablet, that theme is applied on the iPad, but the state of the settings for the set-mobile-theme plugin aren't saved across devices. That is, opening the settings for the plug-in on my iMac, my iPhone, and my iPad should show me the same state on all devices, but only the state of the theme for the device I'm viewing on is actually correct.

What I should be able to do is look at my iPhone and accurately see which theme my iPad is using, and even change it with the drop down menu.

I'm using iCloud Drive for sync, and this problem seems to be related to the data.json file not being synced between iPhone and iPad. Reloading the app on the out-of-sync device does seem to force a reload of the current state from iCloud Drive.

@selfire1
Copy link
Owner

So if you change the theme on the iPad, that change doesn't display on the iPhone. But once you reload on the iPhone the change is synced. Is that right?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants