mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-02-05 11:34:25 +00:00
hide empty posts (without text)
This commit is contained in:
parent
3b1428c441
commit
f7094887d7
@ -158,6 +158,12 @@ function requestRTs(postLi)
|
|||||||
|
|
||||||
function appendPostToContainer(postFromJson, containerToAppend)
|
function appendPostToContainer(postFromJson, containerToAppend)
|
||||||
{
|
{
|
||||||
|
// posts without 'msg' may be used for metadata like 'url'
|
||||||
|
// and are not meant to be displayed.
|
||||||
|
if (typeof(postFromJson['userpost']['msg']) === 'undefined' &&
|
||||||
|
typeof(postFromJson['userpost']['rt']) === 'undefined' )
|
||||||
|
return;
|
||||||
|
|
||||||
var newStreamPost = postToElem(postFromJson, "original");
|
var newStreamPost = postToElem(postFromJson, "original");
|
||||||
newStreamPost.hide();
|
newStreamPost.hide();
|
||||||
containerToAppend.append( newStreamPost );
|
containerToAppend.append( newStreamPost );
|
||||||
|
@ -347,6 +347,12 @@ function timelineChangedUser()
|
|||||||
}
|
}
|
||||||
|
|
||||||
function willBeHidden(post){
|
function willBeHidden(post){
|
||||||
|
// posts without 'msg' may be used for metadata like 'url'
|
||||||
|
// and are not meant to be displayed.
|
||||||
|
if (typeof(post['userpost']['msg']) === 'undefined' &&
|
||||||
|
typeof(post['userpost']['rt']) === 'undefined' )
|
||||||
|
return true;
|
||||||
|
|
||||||
if (post['userpost']['n'] === defaultScreenName)
|
if (post['userpost']['n'] === defaultScreenName)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user