Better formatting
This commit is contained in:
@@ -173,6 +173,7 @@ export function ProfileFeedScreenInner({
|
|||||||
'reduced_onboarding_and_home_algo',
|
'reduced_onboarding_and_home_algo',
|
||||||
)
|
)
|
||||||
const primaryAlgoDialogControl = useDialogControl()
|
const primaryAlgoDialogControl = useDialogControl()
|
||||||
|
const primaryAlgo = preferences.primaryAlgorithm
|
||||||
|
|
||||||
const {
|
const {
|
||||||
mutateAsync: saveFeed,
|
mutateAsync: saveFeed,
|
||||||
@@ -211,9 +212,9 @@ export function ProfileFeedScreenInner({
|
|||||||
!unpinnedFeed &&
|
!unpinnedFeed &&
|
||||||
(!!pinnedFeed || preferences.feeds.pinned.includes(feedInfo.uri))
|
(!!pinnedFeed || preferences.feeds.pinned.includes(feedInfo.uri))
|
||||||
const isPrimaryAlgo =
|
const isPrimaryAlgo =
|
||||||
(preferences.primaryAlgorithm?.enabled &&
|
(primaryAlgo?.enabled &&
|
||||||
preferences.primaryAlgorithm?.uri &&
|
primaryAlgo?.uri &&
|
||||||
preferences.primaryAlgorithm.uri === feedInfo.uri) ||
|
primaryAlgo.uri === feedInfo.uri) ||
|
||||||
(primaryAlgoVariables?.enabled && primaryAlgoVariables.uri === feedInfo.uri)
|
(primaryAlgoVariables?.enabled && primaryAlgoVariables.uri === feedInfo.uri)
|
||||||
|
|
||||||
useSetTitle(feedInfo?.displayName)
|
useSetTitle(feedInfo?.displayName)
|
||||||
@@ -326,38 +327,40 @@ export function ProfileFeedScreenInner({
|
|||||||
}
|
}
|
||||||
avatarType="algo">
|
avatarType="algo">
|
||||||
<View style={[a.flex_row, a.align_center, a.gap_sm]}>
|
<View style={[a.flex_row, a.align_center, a.gap_sm]}>
|
||||||
{feedInfo &&
|
{feedInfo && hasSession && (
|
||||||
hasSession &&
|
<>
|
||||||
(isPrimaryAlgoExperimentEnabled && isPrimaryAlgo ? (
|
{isPrimaryAlgoExperimentEnabled && isPrimaryAlgo ? (
|
||||||
<NewButton
|
<NewButton
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
size="small"
|
size="small"
|
||||||
label={_(
|
label={_(
|
||||||
msg`This feed is already set as your primary algorithm.`,
|
msg`This feed is already set as your primary algorithm.`,
|
||||||
)}
|
)}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
primaryAlgoDialogControl.open()
|
primaryAlgoDialogControl.open()
|
||||||
}}>
|
}}>
|
||||||
<ButtonIcon icon={Check} position="left" />
|
<ButtonIcon icon={Check} position="left" />
|
||||||
<ButtonText>Primary Algorithm</ButtonText>
|
<ButtonText>Primary Algorithm</ButtonText>
|
||||||
</NewButton>
|
</NewButton>
|
||||||
) : (
|
) : (
|
||||||
<NewButton
|
<NewButton
|
||||||
testID={isPinned ? 'unpinBtn' : 'pinBtn'}
|
testID={isPinned ? 'unpinBtn' : 'pinBtn'}
|
||||||
disabled={isPinPending || isUnpinPending}
|
disabled={isPinPending || isUnpinPending}
|
||||||
size="small"
|
size="small"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color={isPinned ? 'secondary' : 'primary'}
|
color={isPinned ? 'secondary' : 'primary'}
|
||||||
label={
|
label={
|
||||||
isPinned ? _(msg`Unpin from home`) : _(msg`Pin to home`)
|
isPinned ? _(msg`Unpin from home`) : _(msg`Pin to home`)
|
||||||
}
|
}
|
||||||
onPress={onTogglePinned}>
|
onPress={onTogglePinned}>
|
||||||
<ButtonText>
|
<ButtonText>
|
||||||
{isPinned ? _(msg`Unpin`) : _(msg`Pin to Home`)}
|
{isPinned ? _(msg`Unpin`) : _(msg`Pin to Home`)}
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</NewButton>
|
</NewButton>
|
||||||
))}
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<Menu.Root>
|
<Menu.Root>
|
||||||
<Menu.Trigger label={_(msg`Open feed options menu`)}>
|
<Menu.Trigger label={_(msg`Open feed options menu`)}>
|
||||||
{({props, state}) => {
|
{({props, state}) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user