Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark mode not set on startup #1525

Closed
JoelFeiner opened this issue Jan 14, 2021 · 20 comments · Fixed by #1569
Closed

Dark mode not set on startup #1525

JoelFeiner opened this issue Jan 14, 2021 · 20 comments · Fixed by #1569

Comments

@JoelFeiner
Copy link

I am using Caprine built from master and installed locally.

When I start Caprine, I do not get dark mode, even though the box is checked in the menu. If I uncheck the box and then check the box again, it switches to dark mode.

@dusansimic
Copy link
Collaborator

Hi! Could you please explain your build process? On what platform are you and what target package did you build? Does that happen every time you start Caprine? Are there any error messages in DevTools?

@JoelFeiner
Copy link
Author

JoelFeiner commented Jan 14, 2021

Hi! Could you please explain your build process? On what platform are you and what target package did you build? Does that happen every time you start Caprine? Are there any error messages in DevTools?

I'm on Ubuntu 20.04. I built for Linux using npm run dist. I had to modify it not to try to build for Windows or MacOS X since I don't have the tools for that. I install using Snap. I verified that it is running my version by changing the version number in the build config and then verifying in the installed Snap that it is using that number. There doesn't appear to be a way to view the version number through the application itself.

It happens every time I start Caprine. There are no messages in the console when I bring up dev tools.

@supra107
Copy link

In my case, it doesn't want to turn on dark mode at all, even after toggling and refreshing three times. Windows 10 1809 LTSC, latest release from GitHub.

@dusansimic
Copy link
Collaborator

@JoelFeiner when you start Caprine, the HTML tag should have dark-mode class and __fb-dark-mode class among others. Please check that you have those classes when you start Caprine and that Dark mode option is checked. If those, classes are present (both of those classes) and Messenger is not dark, please let me know.

@supra107 your issue is unrelated to this. Dark mode fix is not yet available in releases on GitHub. Please wait for the next update of Caprine to get the fix. Author of this issue has the dark mode fix because they compiled Caprine themselves.

@John15321
Copy link

Hi, I have the same issue on Manjaro with Caprine installed from both Manjaro Official Repos and Snap
image

@JoelFeiner
Copy link
Author

@JoelFeiner when you start Caprine, the HTML tag should have dark-mode class and __fb-dark-mode class among others. Please check that you have those classes when you start Caprine and that Dark mode option is checked. If those, classes are present (both of those classes) and Messenger is not dark, please let me know.

@supra107 your issue is unrelated to this. Dark mode fix is not yet available in releases on GitHub. Please wait for the next update of Caprine to get the fix. Author of this issue has the dark mode fix because they compiled Caprine themselves.

This is what it shows:

image

So I do see the dark-mode class. I also see Dark Mode checked in the View menu. But it is not dark.

When I turn off and turn on Dark Mode, it has the __fb-dark-mode class. It looks like that must be missing on startup for some reason.

image

@1nikolas
Copy link
Collaborator

1nikolas commented Jan 19, 2021

Hey I have this issue too. For some reason __fb-dark-mode isn't added although dark-mode is. I have version 2.51.2
image

@js-beaulieu
Copy link

@John15321 This particular issue is a bit different - @JoelFeiner built from master himself. The snap and manjaro package are on the latest release tag.

See my previous issue about that same issue you have. It's reportely already fixed and will be pushed with the next release. #1526

@dusansimic
Copy link
Collaborator

@js-beaulieu is right. The fix is not yet released in Caprine. We are expecting a release soon which will fix several issues alongside dark mode, some keybindings and menu options however there are still more issues to fix since the new desing is completely different from the old one.

@JoelFeiner thanks for the info. I've run Caprine from master a couple of times and I sometimes do experience it and sometimes I don't, which is really weird. I'll see what could be done about that and what might be causing the issue.

@mquevill
Copy link
Collaborator

I just installed Caprine v2.52.0 (on Linux Mint 20.1, from .deb) and the dark mode is not persistent. Every time I start it up, it goes to light mode (even though "Dark Mode" is ticked). I have to turn dark mode off and on again for it to work.

@JoelFeiner JoelFeiner changed the title Dark mode doesn't work on startup [MASTER BRANCH ONLY, NOT 1.52.0!!] Dark mode doesn't work on startup Jan 25, 2021
@JoelFeiner
Copy link
Author

JoelFeiner commented Jan 25, 2021

I've edited the title to indicate that this is not the older released version, but for the master branch.

@JoelFeiner JoelFeiner changed the title [MASTER BRANCH ONLY, NOT 1.52.0!!] Dark mode doesn't work on startup [MASTER BRANCH ONLY, NOT 1.51.2!!] Dark mode doesn't work on startup Jan 25, 2021
@Amandaville
Copy link

Same with the new 2.52.0 .deb release on MX

@JoelFeiner
Copy link
Author

I can confirm the issue persists on main.

@dusansimic
Copy link
Collaborator

We've released a new version (2.52) which adds dark mode but the issue of dark mode not being enabled on startup is still there. I'll try to research this issue more however any help regarding this is very welcome.

Regarding the name of the issue, I'll revert it back to the old one since it is now regarding the latest release of Caprine, not the development branch.

@dusansimic dusansimic changed the title [MASTER BRANCH ONLY, NOT 1.51.2!!] Dark mode doesn't work on startup Dark mode not set on startup Jan 25, 2021
@jlanzobr
Copy link

Can confirm that this bug remains present on Arch Linux, as of Caprine 2.52.0-1.

@RickSlashee
Copy link

Bug remains on Manjaro KDE with Caprine 2.51.2-1

@RickSlashee
Copy link

Can confirm that this bug remains present on Arch Linux, as of Caprine 2.52.0-1.

Bugs are solved if you work with the AppImage

@agorgl
Copy link

agorgl commented Feb 10, 2021

Using latest build on Arch Linux, dark mode does not work even when turning it off and on again

@strazto
Copy link

strazto commented Mar 2, 2021

I think it's been fixed in main as of #1552 , but that hasn't been published as a release yet. For me, it's annoying enough that I considered building from source, but I don't really want to.

@dusansimic do you think the head is ready for a patch release? I'd bet people are going to keep rasing this as a duplicate issue until the version they can install using their package manager includes the startup prefs fix.

@dusansimic
Copy link
Collaborator

@matthewstrasiotto I don't think this issue is fixed by the pr you mentioned. It is an unrelated pr. I've managed to fix it but it's not a pretty solution. I'll submit the pr for review and we'll see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.