                              :minUid min-uid
                              :length 100})
                 fetch-cb (fn [data]
-                           (let [uids (rdr/read-string (str "[" data "]"))]
+                           (let [uids (edn/read-string (str "[" data "]"))]
                              (swap! cmp-state update :not-fetched into uids)
                              ;(shared/alert (:not-fetched @cmp-state))
                              (schedule-read cmp-state put-fn)))]

                              {:folder folder
                               :uid    uid})
                  fetch-cb (fn [data]
                             (let [body (get (js->clj data) "body")
                                   decrypted (decrypt-body body aes-secret)
                                   msg-type (first decrypted)
                                   {:keys [msg-payload msg-meta]} (second decrypted)
                                   msg (with-meta [msg-type msg-payload]

                               (go (<! (as/set-item :last-uid-read uid)))
                               (swap! cmp-state update-in [:not-fetched] disj uid)
                               (swap! cmp-state update-in [:fetched] conj uid)
                               (put-fn msg)))]
              (-> (.fetchImapByUid MailCore (clj->js mail))
                  (.then fetch-cb)
                  (.catch #(.log js/console (str (js->clj %)))))))))
      (catch :default e (js/console.error (str e)))))
  {})

(defn retry-write [{:keys [cmp-state current-state put-fn]}]
