                    :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]]

            [uk.org.potentialdifference.darknet.storage :as storage]
            [cheshire.core :refer [parse-string]]
            [clojure.java.io :as io]
            [clojure.pprint :refer [pprint]]
            [clojure.string :as str])
  (:import [android.app Activity]
           [android.widget Button]
           [android.graphics Color]
