1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Dark Mode: Fixed not toggle action when dark by default

Added test to cover.
For #4543.
This commit is contained in:
Dan Brown
2023-09-14 13:53:24 +01:00
parent 4ec600adfa
commit 417705651c
2 changed files with 17 additions and 1 deletions

View File

@@ -145,7 +145,7 @@ class UserPreferencesController extends Controller
*/
public function toggleDarkMode()
{
$enabled = setting()->getForCurrentUser('dark-mode-enabled', false);
$enabled = setting()->getForCurrentUser('dark-mode-enabled');
setting()->putForCurrentUser('dark-mode-enabled', $enabled ? 'false' : 'true');
return redirect()->back();