mirror of
https://github.com/hyperspacedev/hyperspace
synced 2025-01-30 17:14:57 +01:00
Some timeline fixes
This commit is contained in:
parent
0c8ae28e91
commit
6dc2b2dc0d
@ -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) => {
|
||||
|
@ -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: {
|
||||
|
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user