Page MenuHomePhabricator

D12421.diff
No OneTemporary

D12421.diff

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

Mime Type
text/plain
Expires
Thu, Nov 28, 10:37 PM (14 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595056
Default Alt Text
D12421.diff (3 KB)

Event Timeline