   :load-memories-success
   (fn [app-state [_ memories]]
     (-> app-state
+        (assoc-in [:ui-state :results-page] (:current-page memories))
         (assoc-in [:ui-state :memories] memories)
         (assoc-in [:ui-state :is-searching?] false))
     ))

                    :on-click #(dispatch [:page-memories i])}
               [:a (str (inc i))]]
              ))
          [:li {:class (if (>= @current @pages) "disabled")}
           [:a {:on-click #(dispatch [:page-memories (inc @current)])} "»"]]]]
        ))
    )

(register-handler
  :page-memories
  (fn [app-state [_ i]]
    (let [max          (dec (get-in app-state [:ui-state :memories :pages]))
          idx          (Math/max 0 (Math/min max i))
          current-page (get-in app-state [:ui-state :memories :current-page])]
      (if (not= current-page idx)
        (dispatch [:load-memories idx]))
      (assoc-in app-state [:ui-state :results-page] idx))
    ))

