Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3360508
D12421.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12421.diff
View Options
diff --git a/lib/hooks/invite-links.js b/lib/hooks/invite-links.js
--- a/lib/hooks/invite-links.js
+++ b/lib/hooks/invite-links.js
@@ -168,8 +168,8 @@
+navigateToThread: ThreadInfo => mixed,
};
function useAcceptInviteLink(params: AcceptInviteLinkParams): {
- +joinCommunity: () => mixed,
- +joinThreadLoadingStatus: LoadingStatus,
+ +join: () => mixed,
+ +joinLoadingStatus: LoadingStatus,
} {
const {
verificationResponse,
@@ -343,21 +343,21 @@
]);
const dispatchActionPromise = useDispatchActionPromise();
- const joinCommunity = React.useCallback(() => {
+ const join = React.useCallback(() => {
void dispatchActionPromise(
joinThreadActionTypes,
createJoinCommunityAction(),
);
}, [createJoinCommunityAction, dispatchActionPromise]);
- const joinThreadLoadingStatus = useSelector(joinThreadLoadingStatusSelector);
+ const joinLoadingStatus = useSelector(joinThreadLoadingStatusSelector);
return React.useMemo(
() => ({
- joinCommunity,
- joinThreadLoadingStatus,
+ join,
+ joinLoadingStatus,
}),
- [joinCommunity, joinThreadLoadingStatus],
+ [join, joinLoadingStatus],
);
}
diff --git a/native/navigation/invite-link-modal.react.js b/native/navigation/invite-link-modal.react.js
--- a/native/navigation/invite-link-modal.react.js
+++ b/native/navigation/invite-link-modal.react.js
@@ -59,7 +59,7 @@
[navigateToThreadWithParams],
);
- const { joinCommunity, joinThreadLoadingStatus } = useAcceptInviteLink({
+ const { join, joinLoadingStatus } = useAcceptInviteLink({
verificationResponse: invitationDetails,
inviteSecret: secret,
keyserverOverride,
@@ -120,7 +120,7 @@
const buttons = React.useMemo(() => {
if (linkStatus === 'valid') {
const joinButtonContent =
- joinThreadLoadingStatus === 'loading' ? (
+ joinLoadingStatus === 'loading' ? (
<ActivityIndicator
size="small"
color="white"
@@ -133,8 +133,8 @@
<>
<Button
style={[styles.button, styles.buttonPrimary, styles.gap]}
- onPress={joinCommunity}
- disabled={joinThreadLoadingStatus === 'loading'}
+ onPress={join}
+ disabled={joinLoadingStatus === 'loading'}
>
{joinButtonContent}
</Button>
@@ -157,8 +157,8 @@
);
}, [
closeModal,
- joinCommunity,
- joinThreadLoadingStatus,
+ join,
+ joinLoadingStatus,
linkStatus,
props.navigation.goBack,
styles.activityIndicatorStyle,
diff --git a/web/invite-links/accept-invite-modal.react.js b/web/invite-links/accept-invite-modal.react.js
--- a/web/invite-links/accept-invite-modal.react.js
+++ b/web/invite-links/accept-invite-modal.react.js
@@ -52,7 +52,7 @@
[dispatch, popModal],
);
- const { joinCommunity, joinThreadLoadingStatus } = useAcceptInviteLink({
+ const { join, joinLoadingStatus } = useAcceptInviteLink({
verificationResponse,
inviteSecret,
keyserverOverride,
@@ -74,8 +74,8 @@
<Button
variant="filled"
buttonColor={buttonThemes.standard}
- disabled={joinThreadLoadingStatus === 'loading'}
- onClick={joinCommunity}
+ disabled={joinLoadingStatus === 'loading'}
+ onClick={join}
>
Accept invite
</Button>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 12:58 PM (19 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2579874
Default Alt Text
D12421.diff (3 KB)
Attached To
Mode
D12421: [lib] Rename useAcceptInviteLink return values
Attached
Detach File
Event Timeline
Log In to Comment