|  | @@ -316,20 +316,19 @@
 | 
	
		
			
				|  |  |                   (or (get affected-keys (vec (rest k)))
 | 
	
		
			
				|  |  |                       custom?
 | 
	
		
			
				|  |  |                       kv?))
 | 
	
		
			
				|  |  | -            (util/profile (str "refresh! " (second k))
 | 
	
		
			
				|  |  | -             (let [{:keys [query query-fn]} cache]
 | 
	
		
			
				|  |  | -               (when (or query query-fn)
 | 
	
		
			
				|  |  | -                 (try
 | 
	
		
			
				|  |  | -                   (let [f #(execute-query! repo-url db k tx cache)]
 | 
	
		
			
				|  |  | -                     ;; Detects whether user is editing in a custom query, if so, execute the query immediately
 | 
	
		
			
				|  |  | -                     (if (and custom?
 | 
	
		
			
				|  |  | -                              ;; modifying during cards review need to be executed immediately
 | 
	
		
			
				|  |  | -                              (not (:cards-query? (meta query)))
 | 
	
		
			
				|  |  | -                              (not (state/edit-in-query-component)))
 | 
	
		
			
				|  |  | -                       (async/put! (state/get-reactive-custom-queries-chan) [f query])
 | 
	
		
			
				|  |  | -                       (f)))
 | 
	
		
			
				|  |  | -                   (catch js/Error e
 | 
	
		
			
				|  |  | -                     (js/console.error e))))))))))))
 | 
	
		
			
				|  |  | +            (let [{:keys [query query-fn]} cache]
 | 
	
		
			
				|  |  | +              (when (or query query-fn)
 | 
	
		
			
				|  |  | +                (try
 | 
	
		
			
				|  |  | +                  (let [f #(execute-query! repo-url db k tx cache)]
 | 
	
		
			
				|  |  | +                    ;; Detects whether user is editing in a custom query, if so, execute the query immediately
 | 
	
		
			
				|  |  | +                    (if (and custom?
 | 
	
		
			
				|  |  | +                             ;; modifying during cards review need to be executed immediately
 | 
	
		
			
				|  |  | +                             (not (:cards-query? (meta query)))
 | 
	
		
			
				|  |  | +                             (not (state/edit-in-query-component)))
 | 
	
		
			
				|  |  | +                      (async/put! (state/get-reactive-custom-queries-chan) [f query])
 | 
	
		
			
				|  |  | +                      (f)))
 | 
	
		
			
				|  |  | +                  (catch js/Error e
 | 
	
		
			
				|  |  | +                    (js/console.error e)))))))))))
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  (defn set-key-value
 | 
	
		
			
				|  |  |    [repo-url key value]
 |