History

Fix watching for theme change

Jed Fox committed 6 years ago

Commit cc406a81 parent e8b13591 file · +1 −1Browse files

Showing the changes to assets/javascripts (1 of 1 file). Show all

Unified · Split

assets/javascripts/app/settings.coffee+1−1
@@ -40,7 +40,7 @@ class app.Settings · 39 unmodified lines
4040 @autoSupported = window.matchMedia('(prefers-color-scheme)').media != 'not all'
4141 if @autoSupported
4242 @darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)')
43− @darkModeQuery.onchange = -> @setTheme(@get('theme'))
43+ @darkModeQuery.addListener => @setTheme(@get('theme'))
4444
4545
4646 get: (key) ->

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t