Improve and Fix Unmute Behavior for Chats and Communities (#21052)
83aa01c7...9e722ed0
This commit is contained in:
parent
8cac0e46b1
commit
6db24a4a6c
|
@ -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")
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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))))))
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue