Ensures media-less posts don't get into timelines or grids. Fixes #31
This commit is contained in:
parent
4f233be6e1
commit
e67064d0c3
File diff suppressed because it is too large
Load Diff
|
@ -34,6 +34,12 @@ const GridPostJsx = (props) => {
|
|||
}
|
||||
|
||||
const GridViewJsx = (props) => {
|
||||
// Ensure only posts with media get into the grid
|
||||
const postsWithMedia = props.posts.filter(
|
||||
p => p.media_attachments != null
|
||||
&& p.media_attachments.length > 0
|
||||
);
|
||||
|
||||
let rows = partition(props.posts, 3);
|
||||
return (
|
||||
<View>
|
||||
|
|
|
@ -4,6 +4,12 @@ import { View } from "react-native";
|
|||
import { PostByDataJsx } from "src/components/posts/post";
|
||||
|
||||
const TimelineViewJsx = (props) => {
|
||||
// Ensure only posts with media get in the timeline
|
||||
const posts = props.posts.filter(
|
||||
p => p.media_attachments != null
|
||||
&& p.media_attachments.length > 0
|
||||
);
|
||||
|
||||
return (
|
||||
<View>
|
||||
{ props.posts.map((post, i) => {
|
||||
|
|
Loading…
Reference in New Issue