From ab37d30e2d64dfcc889329276dd8ca310d7429ba Mon Sep 17 00:00:00 2001 From: Andelf Date: Fri, 5 Jan 2024 15:47:35 +0800 Subject: [PATCH] fix(sync): do not notify when logged out --- src/main/frontend/fs/sync.cljs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/frontend/fs/sync.cljs b/src/main/frontend/fs/sync.cljs index d300610ddd1..51d8a19a2d7 100644 --- a/src/main/frontend/fs/sync.cljs +++ b/src/main/frontend/fs/sync.cljs @@ -3364,18 +3364,19 @@ ok? (and (= 200 (:status r1*)) (= 200 (:status r2*)) (= "OK" (:body r2*)))] - (if ok? - (notification/clear! :sync-connection-failed) - (notification/show! [:div - (t :file-sync/connectivity-testing-failed) - [:a {:href api-url} api-url] - " and " - [:a - {:href config/CONNECTIVITY-TESTING-S3-URL} - config/CONNECTIVITY-TESTING-S3-URL]] - :warning - false - :sync-connection-failed)) + (when (user/logged-in?) + (if ok? + (notification/clear! :sync-connection-failed) + (notification/show! [:div + (t :file-sync/connectivity-testing-failed) + [:a {:href api-url} api-url] + " and " + [:a + {:href config/CONNECTIVITY-TESTING-S3-URL} + config/CONNECTIVITY-TESTING-S3-URL]] + :warning + false + :sync-connection-failed))) ok?))) (declare network-online-cursor)