Removed unused CommunityTimeline references, public timeline route

• Removed:
- unused CommunityTimeline references, public timeline route
This commit is contained in:
mgabdev 2021-01-13 21:43:18 -05:00
parent 89a16b101f
commit 3c252e0f4c
5 changed files with 0 additions and 82 deletions

View File

@ -86,9 +86,6 @@ export const dequeueTimeline = (timeline, expandFunc, optionalExpandArgs) => (di
if (timeline === 'home') { if (timeline === 'home') {
dispatch(clearTimeline(timeline)) dispatch(clearTimeline(timeline))
dispatch(expandHomeTimeline(optionalExpandArgs)) dispatch(expandHomeTimeline(optionalExpandArgs))
} else if (timeline === 'community') {
dispatch(clearTimeline(timeline))
dispatch(expandCommunityTimeline(optionalExpandArgs))
} else { } else {
shouldDispatchDequeue = false shouldDispatchDequeue = false
} }
@ -238,16 +235,6 @@ export const expandProTimeline = ({ maxId } = {}, done = noop) => {
}, done) }, done)
} }
/**
*
*/
export const expandCommunityTimeline = ({ maxId, onlyMedia } = {}, done = noop) => {
return expandTimeline(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', {
max_id: maxId,
only_media: !!onlyMedia,
}, done)
}
/** /**
* *
*/ */

View File

@ -1,65 +0,0 @@
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { defineMessages, injectIntl } from 'react-intl'
import { expandCommunityTimeline } from '../actions/timelines'
import StatusList from '../components/status_list'
class CommunityTimeline extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
}
componentDidMount () {
const { dispatch, onlyMedia } = this.props
dispatch(expandCommunityTimeline({ onlyMedia }))
}
componentDidUpdate (prevProps) {
if (prevProps.onlyMedia !== this.props.onlyMedia) {
const { dispatch, onlyMedia } = this.props
dispatch(expandCommunityTimeline({ onlyMedia }))
}
}
handleLoadMore = maxId => {
const { dispatch, onlyMedia } = this.props
dispatch(expandCommunityTimeline({ maxId, onlyMedia }))
}
render () {
const { intl, onlyMedia } = this.props
const emptyMessage = intl.formatMessage(messages.empty)
return (
<StatusList
scrollKey='community_timeline'
timelineId={`community${onlyMedia ? ':media' : ''}`}
onLoadMore={this.handleLoadMore}
emptyMessage={emptyMessage}
/>
)
}
}
const messages = defineMessages({
empty: { id: 'empty_column.community', defaultMessage: 'The community timeline is empty. Write something publicly to get the ball rolling!' },
})
const mapStateToProps = (state) => ({
onlyMedia: state.getIn(['settings', 'community', 'other', 'onlyMedia'])
})
CommunityTimeline.propTypes = {
dispatch: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
onlyMedia: PropTypes.bool,
}
export default injectIntl(connect(mapStateToProps)(CommunityTimeline))

View File

@ -71,7 +71,6 @@ import {
ChatConversationRequests, ChatConversationRequests,
ChatConversationBlockedAccounts, ChatConversationBlockedAccounts,
ChatConversationMutes, ChatConversationMutes,
CommunityTimeline,
Compose, Compose,
Deck, Deck,
DMCA, DMCA,
@ -227,7 +226,6 @@ class SwitchingArea extends React.PureComponent {
<WrappedRoute path='/messages/muted_conversations' exact page={MessagesPage} component={ChatConversationMutes} content={children} componentParams={{ isSettings: true }} /> <WrappedRoute path='/messages/muted_conversations' exact page={MessagesPage} component={ChatConversationMutes} content={children} componentParams={{ isSettings: true }} />
<WrappedRoute path='/messages/:chatConversationId' exact page={MessagesPage} component={Messages} content={children} componentParams={{ source: 'approved' }} /> <WrappedRoute path='/messages/:chatConversationId' exact page={MessagesPage} component={Messages} content={children} componentParams={{ source: 'approved' }} />
<WrappedRoute path='/timeline/all' exact page={CommunityPage} component={CommunityTimeline} content={children} componentParams={{ title: 'Community Feed' }} />
<WrappedRoute path='/timeline/pro' exact page={ProPage} component={ProTimeline} content={children} componentParams={{ title: 'Pro Feed' }} /> <WrappedRoute path='/timeline/pro' exact page={ProPage} component={ProTimeline} content={children} componentParams={{ title: 'Pro Feed' }} />
<WrappedRoute path='/groups' publicRoute exact page={GroupsPage} component={GroupCollectionTimeline} content={children} componentParams={{ activeTab: 'timeline', collectionType: 'member' }} /> <WrappedRoute path='/groups' publicRoute exact page={GroupsPage} component={GroupCollectionTimeline} content={children} componentParams={{ activeTab: 'timeline', collectionType: 'member' }} />

View File

@ -28,7 +28,6 @@ export function ChatConversationMutes() { return import(/* webpackChunkName: "fe
export function ChatMessageOptionsPopover() { return import(/* webpackChunkName: "components/chat_message_options_popover" */'../../../components/popover/chat_message_options_popover') } export function ChatMessageOptionsPopover() { return import(/* webpackChunkName: "components/chat_message_options_popover" */'../../../components/popover/chat_message_options_popover') }
export function ChatSettingsPopover() { return import(/* webpackChunkName: "components/chat_settings_popover" */'../../../components/popover/chat_settings_popover') } export function ChatSettingsPopover() { return import(/* webpackChunkName: "components/chat_settings_popover" */'../../../components/popover/chat_settings_popover') }
export function CommentSortingOptionsPopover() { return import(/* webpackChunkName: "components/comment_sorting_options_popover" */'../../../components/popover/comment_sorting_options_popover') } export function CommentSortingOptionsPopover() { return import(/* webpackChunkName: "components/comment_sorting_options_popover" */'../../../components/popover/comment_sorting_options_popover') }
export function CommunityTimeline() { return import(/* webpackChunkName: "features/community_timeline" */'../../community_timeline') }
export function Compose() { return import(/* webpackChunkName: "features/compose" */'../../compose') } export function Compose() { return import(/* webpackChunkName: "features/compose" */'../../compose') }
export function ComposeForm() { return import(/* webpackChunkName: "components/compose_form" */'../../compose/components/compose_form') } export function ComposeForm() { return import(/* webpackChunkName: "components/compose_form" */'../../compose/components/compose_form') }
export function ComposeModal() { return import(/* webpackChunkName: "components/compose_modal" */'../../../components/modal/compose_modal') } export function ComposeModal() { return import(/* webpackChunkName: "components/compose_modal" */'../../../components/modal/compose_modal') }

View File

@ -210,7 +210,6 @@ Rails.application.routes.draw do
namespace :timelines do namespace :timelines do
resource :home, only: :show, controller: :home resource :home, only: :show, controller: :home
resource :public, only: :show, controller: :public
resource :pro, only: :show, controller: :pro resource :pro, only: :show, controller: :pro
resources :tag, only: :show resources :tag, only: :show
resources :list, only: :show resources :list, only: :show