Page MenuHomePhabricator

D12042.id40202.diff
No OneTemporary

D12042.id40202.diff

diff --git a/native/community-settings/tag-farcaster-channel/tag-channel-button.react.js b/native/community-settings/tag-farcaster-channel/tag-channel-button.react.js
--- a/native/community-settings/tag-farcaster-channel/tag-channel-button.react.js
+++ b/native/community-settings/tag-farcaster-channel/tag-channel-button.react.js
@@ -28,11 +28,12 @@
type Props = {
+communityID: string,
+ +isLoadingChannelInfo: boolean,
+setError: SetState<?string>,
};
function TagChannelButton(props: Props): React.Node {
- const { communityID, setError } = props;
+ const { communityID, isLoadingChannelInfo, setError } = props;
const { navigate } = useNavigation();
@@ -159,7 +160,8 @@
createOrUpdateFarcasterChannelTagStatusSelector,
);
const isLoadingCreateOrUpdateFarcasterChannelTag =
- createOrUpdateFarcasterChannelTagStatus === 'loading';
+ createOrUpdateFarcasterChannelTagStatus === 'loading' ||
+ isLoadingChannelInfo;
const buttonContent = React.useMemo(() => {
if (isLoadingCreateOrUpdateFarcasterChannelTag) {
diff --git a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel.react.js b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel.react.js
--- a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel.react.js
+++ b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel.react.js
@@ -46,10 +46,15 @@
const [selectedChannel, setSelectedChannel] =
React.useState<?NeynarChannel>(farcasterChannel);
+ const [isLoadingChannelInfo, setIsLoadingChannelInfo] = React.useState(false);
+
React.useEffect(() => {
void (async () => {
+ setIsLoadingChannelInfo(true);
+
if (!communityInfo?.farcasterChannelID) {
setSelectedChannel(null);
+ setIsLoadingChannelInfo(false);
return;
}
@@ -59,6 +64,7 @@
);
setSelectedChannel(channel);
+ setIsLoadingChannelInfo(false);
})();
}, [client, communityInfo?.farcasterChannelID, fid]);
@@ -94,7 +100,11 @@
<View style={styles.panelSectionContainer}>
<Text style={styles.sectionText}>Selected channel:</Text>
<Text style={styles.channelNameText}>{channelNameTextContent}</Text>
- <TagChannelButton communityID={communityID} setError={setError} />
+ <TagChannelButton
+ communityID={communityID}
+ isLoadingChannelInfo={isLoadingChannelInfo}
+ setError={setError}
+ />
</View>
<View style={styles.errorContainer}>{errorMessage}</View>
</View>
@@ -107,6 +117,7 @@
styles.errorContainer,
channelNameTextContent,
communityID,
+ isLoadingChannelInfo,
errorMessage,
],
);

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 1:39 PM (21 h, 9 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2538140
Default Alt Text
D12042.id40202.diff (2 KB)

Event Timeline