                        :storage-changed (do (when-let [id (get-in state [:puzzle :id])]
                                               (load-progress id @stg/storage event-chan))
                                             (pw/clear-puzzle! (:widget state))
+                                            (reload-style-from-storage @stg/storage (:widget state))
                                             (-> state
                                                 clear-state
                                                 (assoc :storage @stg/storage)))

  (stg/save-preferences storage style nil)
  (pw/change-style! widget style)
  state)

(defn load-progress [id storage event-chan]
  (stg/load-progress storage [id]


(defn ^:export init [view]
  (pw/init! view)
  (reload-style-from-storage @stg/storage view)
  (start-async-loop view))
