File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 180
180
(t :open-a-directory )
181
181
:on-click #(state/pub-event! [:graph/setup-a-repo ]))]))]]
182
182
183
- (when (and (file-sync/enable-sync? ) login?)
183
+ (when (and (or (file-sync/enable-sync? )
184
+ (state/enable-rtc? ))
185
+ login?)
184
186
[:div
185
187
[:hr ]
186
188
[:div.flex.align-items.justify-between
Original file line number Diff line number Diff line change 876
876
(ui/toggle enabled?
877
877
(fn []
878
878
(let [value (not enabled?)]
879
- (config-handler /set-config! :feature/enable- rtc? value)))
879
+ (state /set-rtc-enabled! value)))
880
880
true ))
881
881
882
882
(defn rtc-switcher-row [enabled?]
1121
1121
(when (and (config/db-based-graph? current-repo)
1122
1122
(user-handler/team-member? ))
1123
1123
; ; FIXME: Wire this up again to RTC init calls
1124
- (rtc-switcher-row (state/enable-rtc? current-repo )))
1124
+ (rtc-switcher-row (state/enable-rtc? )))
1125
1125
(when-not web-platform?
1126
1126
[:div.mt-1.sm:mt-0.sm:col-span-2
1127
1127
[:hr ]
Original file line number Diff line number Diff line change 303
303
:ui/cached-key->container-id (atom {})
304
304
:feature/enable-sync? (storage/get :logseq-sync-enabled )
305
305
:feature/enable-sync-diff-merge? ((fnil identity true ) (storage/get :logseq-sync-diff-merge-enabled ))
306
+ :feature/enable-rtc? (storage/get :logseq-rtc-enabled )
306
307
307
308
:file/rename-event-chan (async/chan 100 )
308
309
:ui/find-in-page nil
@@ -746,8 +747,8 @@ Similar to re-frame subscriptions"
746
747
(not (false ? (:feature/enable-whiteboards? (sub-config repo))))))
747
748
748
749
(defn enable-rtc?
749
- [repo ]
750
- (:feature/enable-rtc? ( sub-config repo) ))
750
+ []
751
+ (sub :feature/enable-rtc? ))
751
752
752
753
(defn enable-git-auto-push?
753
754
[repo]
@@ -2371,3 +2372,8 @@ Similar to re-frame subscriptions"
2371
2372
(prn :debug :set :days days)
2372
2373
(reset! (:ui/highlight-recent-days @state) days)
2373
2374
(storage/set :ui/highlight-recent-days days))
2375
+
2376
+ (defn set-rtc-enabled!
2377
+ [value]
2378
+ (storage/set :logseq-rtc-enabled value)
2379
+ (set-state! :feature/enable-rtc? value))
You can’t perform that action at this time.
0 commit comments