mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
enhance: presence debounce
This commit is contained in:
@@ -233,6 +233,18 @@
|
|||||||
@apply absolute top-1/2 -translate-y-1/2 pointer-events-none;
|
@apply absolute top-1/2 -translate-y-1/2 pointer-events-none;
|
||||||
left: 6px;
|
left: 6px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
opacity: 0;
|
||||||
|
animation: block-editing-avatar-fade-in 160ms ease-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes block-editing-avatar-fade-in {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ls-page-title .block-control-wrap {
|
.ls-page-title .block-control-wrap {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
[frontend.handler.repo :as repo-handler]
|
[frontend.handler.repo :as repo-handler]
|
||||||
[frontend.handler.user :as user-handler]
|
[frontend.handler.user :as user-handler]
|
||||||
[frontend.state :as state]
|
[frontend.state :as state]
|
||||||
|
[frontend.util :as util]
|
||||||
[lambdaisland.glogi :as log]
|
[lambdaisland.glogi :as log]
|
||||||
[logseq.db :as ldb]
|
[logseq.db :as ldb]
|
||||||
[logseq.db-sync.malli-schema :as db-sync-schema]
|
[logseq.db-sync.malli-schema :as db-sync-schema]
|
||||||
@@ -166,9 +167,15 @@
|
|||||||
(log/info :db-sync/stop true)
|
(log/info :db-sync/stop true)
|
||||||
(state/<invoke-db-worker :thread-api/db-sync-stop))
|
(state/<invoke-db-worker :thread-api/db-sync-stop))
|
||||||
|
|
||||||
|
(defonce ^:private debounced-update-presence
|
||||||
|
(util/debounce
|
||||||
|
(fn [editing-block-uuid]
|
||||||
|
(state/<invoke-db-worker :thread-api/db-sync-update-presence editing-block-uuid))
|
||||||
|
1000))
|
||||||
|
|
||||||
(defn <rtc-update-presence!
|
(defn <rtc-update-presence!
|
||||||
[editing-block-uuid]
|
[editing-block-uuid]
|
||||||
(state/<invoke-db-worker :thread-api/db-sync-update-presence editing-block-uuid))
|
(debounced-update-presence editing-block-uuid))
|
||||||
|
|
||||||
(defn <rtc-get-users-info
|
(defn <rtc-get-users-info
|
||||||
[]
|
[]
|
||||||
|
|||||||
Reference in New Issue
Block a user