@planningcenter/topbar 12.2.3-rc.0 → 12.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/topbar.js +6 -5
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +6 -5
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +6 -5
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +6 -5
- package/dist/topbar.umd.js.map +1 -1
- package/package.json +2 -3
package/dist/topbar.umd.js
CHANGED
|
@@ -5690,10 +5690,10 @@ true;
|
|
|
5690
5690
|
userId
|
|
5691
5691
|
}) => {
|
|
5692
5692
|
const [displayChatIcon, setDisplayChatIcon] = React.useState(false);
|
|
5693
|
-
const [
|
|
5693
|
+
const [hasUnread, setHasUnread] = React.useState(false);
|
|
5694
5694
|
const fetchChatPerson = async () => {
|
|
5695
5695
|
const url = `${window.location.origin}/~api/chat/v2/me`;
|
|
5696
|
-
const personFields = ["can_chat_pending_age_check", "unread_messages"].join(",");
|
|
5696
|
+
const personFields = ["can_chat_pending_age_check", "unread_messages", "unread_reactions"].join(",");
|
|
5697
5697
|
const query = `?fields[Person]=${personFields}`;
|
|
5698
5698
|
const {
|
|
5699
5699
|
json
|
|
@@ -5705,9 +5705,10 @@ true;
|
|
|
5705
5705
|
}) => {
|
|
5706
5706
|
const {
|
|
5707
5707
|
can_chat_pending_age_check,
|
|
5708
|
-
unread_messages
|
|
5708
|
+
unread_messages,
|
|
5709
|
+
unread_reactions
|
|
5709
5710
|
} = data.attributes;
|
|
5710
|
-
|
|
5711
|
+
setHasUnread(unread_messages || unread_reactions);
|
|
5711
5712
|
setDisplayChatIcon(can_chat_pending_age_check);
|
|
5712
5713
|
}).catch(noop);
|
|
5713
5714
|
const chatJoltChannel = useJoltChannelSubscription({
|
|
@@ -5739,7 +5740,7 @@ true;
|
|
|
5739
5740
|
}, [isEnabled]);
|
|
5740
5741
|
return {
|
|
5741
5742
|
displayChatIcon,
|
|
5742
|
-
unreadIndicator:
|
|
5743
|
+
unreadIndicator: hasUnread
|
|
5743
5744
|
};
|
|
5744
5745
|
};
|
|
5745
5746
|
|