     (-> app-state
         (assoc-in [:ui-state :is-busy?] false)
         (assoc-in [:note :current-note] "")
-        (assoc-in [:note :thread] nil)
+        (assoc-in [:ui-state :show-thread-id] nil)
         (assoc-in [:ui-state :show-thread?] false)
         (assoc-in [:note :focus] nil)
         (assoc :search-state nil))))

(register-handler
  :memory-forget-success
  (fn [app-state [_ msg]]
    (let [thread     (get-in app-state [:note :thread])
          in-thread? (and thread
                          (get-in app-state [:ui-state :show-thread?]))]
      (dispatch [:state-message (str "Thought forgotten") "alert-success"])
      (if (= :remember (get-in app-state [:ui-state :section])) ; Just in case we allow editing from elsewhere...
        (dispatch [:memories-load]))
      (if in-thread?
        (dispatch [:thread-load (:id (first thread))]))
      (-> app-state
          (assoc-in [:ui-state :is-busy?] false)
          (assoc-in [:note :edit-memory] nil)

(register-handler
  :memory-edit-save-success
  (fn [app-state [_ msg]]
    (let [thread-id (get-in app-state [:ui-state :show-thread-id])]
      (dispatch [:state-message (str "Updated memory to: " msg) "alert-success"])
      (if (= :remember (get-in app-state [:ui-state :section])) ; Just in case we allow editing from elsewhere...
        (dispatch [:memories-load]))
      (if thread-id
        (dispatch [:thread-load thread-id]))
      (-> app-state
          (assoc-in [:ui-state :is-busy?] false)
          (assoc-in [:note :edit-memory] nil)
