Some timeline fixes

This commit is contained in:
Marquis Kurt 2019-03-31 18:18:04 -04:00
parent 0c8ae28e91
commit 6dc2b2dc0d
3 changed files with 6 additions and 3 deletions

View File

@ -35,7 +35,7 @@ class LocalPage extends Component<any, ILocalPageState> {
}
componentWillMount() {
this.streamListener = this.client.stream('/streaming/local');
this.streamListener = this.client.stream('/streaming/public/local');
this.streamListener.on('connect', () => {
this.client.get('/timelines/public', {limit: 40, local: true}).then((resp: any) => {
@ -105,7 +105,7 @@ class LocalPage extends Component<any, ILocalPageState> {
loadMoreTimelinePieces() {
this.setState({ viewDidLoad: false, viewIsLoading: true})
if (this.state.posts) {
this.client.get('/timelines/home', { max_id: this.state.posts[this.state.posts.length - 1].id, limit: 20 }).then((resp: any) => {
this.client.get('/timelines/public', { max_id: this.state.posts[this.state.posts.length - 1].id, limit: 20, local: true }).then((resp: any) => {
let newPosts: [Status] = resp.data;
let posts = this.state.posts as [Status];
newPosts.forEach((post: Status) => {

View File

@ -136,6 +136,9 @@ export const styles = (theme: Theme) => createStyles({
textAlign: 'center',
[theme.breakpoints.up('md')]: {
marginRight: '55%'
},
[theme.breakpoints.up('xl')]: {
marginRight: '50%'
}
},
pageTopChip: {

View File

@ -105,7 +105,7 @@ class PublicPage extends Component<any, IPublicPageState> {
loadMoreTimelinePieces() {
this.setState({ viewDidLoad: false, viewIsLoading: true})
if (this.state.posts) {
this.client.get('/timelines/home', { max_id: this.state.posts[this.state.posts.length - 1].id, limit: 20 }).then((resp: any) => {
this.client.get('/timelines/public', { max_id: this.state.posts[this.state.posts.length - 1].id, limit: 20 }).then((resp: any) => {
let newPosts: [Status] = resp.data;
let posts = this.state.posts as [Status];
newPosts.forEach((post: Status) => {