                    :camera parse-long})))
 
 (defn replace-view! [^Activity this ^View new]
-  (on-ui
-      (when-let [^View container (find-view this ::container)]
-        (let [^View old (.getChildAt  container 0)]
-          (.removeView container old)
-          (.addView container new 0)))))
+  (when-let [^View container (find-view this ::container)]
+    (let [^View old (.getChildAt  container 0)]
+      (.removeView container old)
+      (.addView container new 0))))
 
 (defn create-mjpeg-view ^MjpegView [^Context context source-url width height]
   (let [^MjpegView mjpeg-view (new MjpegView context)]

            [neko.threading :refer [on-ui]]
            [neko.log :as log]
            [neko.intent :as intent]
            [neko.ui :refer [make-ui]]
            [neko.ui.mapping :refer [defelement]]
            [uk.org.potentialdifference.darknet.config :refer [config]]

      (server/get-bytes uri f))
    view))

(defn image-from-path [activity path]
  (doto (ImageView. activity)
    (fit-linear-layout!)
    (.setImageBitmap (BitmapFactory/decodeFile path))))

(defn view-image [activity intruction]
  (on-ui
