diff --git a/lib/actions/ui.js b/lib/actions/ui.js index ee4cfd72..39056bcf 100644 --- a/lib/actions/ui.js +++ b/lib/actions/ui.js @@ -60,14 +60,18 @@ export function resetFontSize () { } export function setFontSmoothing () { - const devicePixelRatio = window.devicePixelRatio; - const fontSmoothing = devicePixelRatio < 2 - ? 'subpixel-antialiased' - : 'antialiased'; + return (dispatch) => { + setTimeout(() => { + const devicePixelRatio = window.devicePixelRatio; + const fontSmoothing = devicePixelRatio < 2 + ? 'subpixel-antialiased' + : 'antialiased'; - return { - type: UI_FONT_SMOOTHING_SET, - fontSmoothing + dispatch({ + type: UI_FONT_SMOOTHING_SET, + fontSmoothing + }); + }, 100); }; }