@selfcommunity/react-core 0.4.9-alpha.15 → 0.4.9-alpha.17
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.
|
@@ -88,7 +88,9 @@ function useSCSubscribedGroupsManager(user) {
|
|
|
88
88
|
return Promise.reject(res);
|
|
89
89
|
}
|
|
90
90
|
updateCache([group.id]);
|
|
91
|
-
setData((prev) => getDataUpdated(prev, group.id, group.privacy === types_1.SCGroupPrivacyType.PRIVATE
|
|
91
|
+
setData((prev) => getDataUpdated(prev, group.id, group.privacy === types_1.SCGroupPrivacyType.PRIVATE && group.subscription_status !== types_1.SCGroupSubscriptionStatusType.INVITED
|
|
92
|
+
? types_1.SCGroupSubscriptionStatusType.REQUESTED
|
|
93
|
+
: types_1.SCGroupSubscriptionStatusType.SUBSCRIBED));
|
|
92
94
|
setUnLoading(group.id);
|
|
93
95
|
return Promise.resolve(res.data);
|
|
94
96
|
});
|
|
@@ -85,7 +85,9 @@ export default function useSCSubscribedGroupsManager(user) {
|
|
|
85
85
|
return Promise.reject(res);
|
|
86
86
|
}
|
|
87
87
|
updateCache([group.id]);
|
|
88
|
-
setData((prev) => getDataUpdated(prev, group.id, group.privacy === SCGroupPrivacyType.PRIVATE
|
|
88
|
+
setData((prev) => getDataUpdated(prev, group.id, group.privacy === SCGroupPrivacyType.PRIVATE && group.subscription_status !== SCGroupSubscriptionStatusType.INVITED
|
|
89
|
+
? SCGroupSubscriptionStatusType.REQUESTED
|
|
90
|
+
: SCGroupSubscriptionStatusType.SUBSCRIBED));
|
|
89
91
|
setUnLoading(group.id);
|
|
90
92
|
return Promise.resolve(res.data);
|
|
91
93
|
});
|