Improve and Fix Unmute Behavior for Chats and Communities (#21052)

83aa01c7...9e722ed0
This commit is contained in:
Parvesh Monu 2024-08-30 18:09:54 +05:30 committed by GitHub
parent 8cac0e46b1
commit 6db24a4a6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 10 deletions

View File

@ -17,7 +17,7 @@
(let [parsed-time (t.format/parse (t.format/formatters :date-time-no-ms) muted-till-string)
hours-and-minutes (str (add-leading-zero (t/hour (t/plus parsed-time time-zone-offset)))
":"
(add-leading-zero (t/minute parsed-time)))
(add-leading-zero (t/minute (t/plus parsed-time time-zone-offset))))
when-to-unmute (cond (= go-default-time
muted-till-string) (i18n/label :t/until-you-turn-it-back-on)
(today? parsed-time) (str hours-and-minutes " today")

View File

@ -25,7 +25,7 @@
token-permissions-check id last-opened-at]
:as community} (data-store.communities/<-rpc community-js)
previous-last-opened-at (get-in db [:communities id :last-opened-at])]
(when (> clock (get-in db [:communities id :clock]))
(when (>= clock (get-in db [:communities id :clock]))
{:db (assoc-in db
[:communities id]
(assoc community :last-opened-at (max last-opened-at previous-last-opened-at)))

View File

@ -181,9 +181,4 @@
(testing "given a community with lower clock"
(let [effects (events/handle-community {:db {:communities {community-id {:clock 3}}}} [community])]
(is (nil? effects))))
(testing "given a community without clock"
(let [community #js {:id community-id}
effects (events/handle-community {} [community])]
(is (nil? effects))))))

View File

@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.184.49",
"commit-sha1": "82ba10ede7a003e4ad23008e732e4690ae5ec430",
"src-sha256": "1n06wj379gz83g8jxg407923cak4iic1qj5ms2zpf6qp31sgq24m"
"version": "v0.184.51",
"commit-sha1": "9e722ed09544cc798bc8aa5cdb3b7b58241fbf95",
"src-sha256": "1r8w9309gffb52myfgnqyv8cpn372qkq14hpwk2zmz86qphw9jvf"
}