Discovery fixes #2576

Merged
neb-b merged 10 commits from discovery-fixes into master 2019-06-28 09:27:56 +02:00
3 changed files with 5 additions and 6 deletions
Showing only changes of commit 7f5aff8cd0 - Show all commits

View file

@ -26,8 +26,8 @@ type Props = {
export default function ClaimList(props: Props) {
const { uris, headerAltControls, injectedItem, loading, persistedStorageKey, empty, meta, type, header } = props;
const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW);
const sortedUris = uris && currentSort === SORT_NEW ? uris.slice().reverse() : uris;
const hasUris = uris && !!uris.length;
const sortedUris = (hasUris && (currentSort === SORT_NEW ? uris : uris.slice().reverse())) || [];
function handleSortChange() {
setCurrentSort(currentSort === SORT_NEW ? SORT_OLD : SORT_NEW);

View file

@ -34,7 +34,7 @@ export default function SubscribeButton(props: Props) {
} = props;
const subscriptionHandler = isSubscribed ? doChannelUnsubscribe : doChannelSubscribe;
const subscriptionLabel = isSubscribed ? __('Subscribed') : __('Subscribe');
const subscriptionLabel = isSubscribed ? __('Following') : __('Follow');
const { claimName } = parseURI(uri);
@ -57,7 +57,7 @@ export default function SubscribeButton(props: Props) {
});
if (showSnackBarOnSubscribe) {
doToast({ message: `${__('Successfully subscribed to')} ${claimName}!` });
doToast({ message: `${__('Now following ')} ${claimName}!` });
}
}}
/>

View file

@ -69,12 +69,11 @@ export default function SubscriptionsPage(props: Props) {
headerAltControls={
<Button
button="link"
label={viewingSuggestedSubs ? hasSubscriptions && __('View Your Subscriptions') : __('Find New Channels')}
label={viewingSuggestedSubs ? hasSubscriptions && __('Following') : __('Find New Channels')}
onClick={() => onClick()}
/>
}
// Fix the need to reverse this
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => sub.uri) : uris.reverse()}
uris={viewingSuggestedSubs ? suggestedSubscriptions.map(sub => sub.uri) : uris}
/>
</div>
</Page>