             :progress-running? false
             :player            {}
             :evolution-number  0
-            :sort-asc              true}))
+            :sort-asc          true}))
 
 (declare get-pokemon-by-id)
 (declare evolution-sum)

(defn sort-pokemon!
  "Sort complete list of pokemon by given key."
  [key]
  (om/transact! reconciler `[(sort/pokemon {:key ~key})])
  (om/transact! reconciler `[(sort/toggle-asc)]))

(defn update-player!
  "Update the playerdata."


(defmethod mutate 'sort/pokemon
  [{:keys [state]} _ {:keys [key]}]
  {:action (fn []
             (swap! state update-in [:pokemon] (fn [] (cond-> (sort-by (juxt key :individual_percentage :cp) (:pokemon @state))
                                                              (:sort-asc @state) reverse)))
             (swap! state update-in [:sort-asc] not))})

(defmethod mutate 'change/view
  [{:keys [state]} _ {:keys [view]}]
