mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-14 17:07:53 +00:00
fix checks for twist .msg fields emptiness when it's need to decide whether twist should be displayed or not
This commit is contained in:
parent
5c5f262ca0
commit
cfd51f163e
@ -156,12 +156,12 @@ function requestRTs(postLi)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendPostToElem(postFromJson, elem) {
|
function appendPostToElem(post, elem) {
|
||||||
// posts without 'msg' and 'rt' may be used for metadata like 'url' and are not meant to be displayed
|
// posts without 'msg' and 'rt.msg' may be used for metadata like 'url' and are not meant to be displayed
|
||||||
if (!postFromJson.userpost.msg && !postFromJson.userpost.rt)
|
if (!post.userpost.msg && (!post.userpost.rt || (post.userpost.rt && !post.userpost.rt.msg)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
postToElem(postFromJson, 'original').hide().appendTo(elem).slideDown('fast');
|
postToElem(post, 'original').hide().appendTo(elem).slideDown('fast');
|
||||||
|
|
||||||
$.MAL.postboardLoaded();
|
$.MAL.postboardLoaded();
|
||||||
}
|
}
|
||||||
|
@ -347,10 +347,8 @@ function timelineChangedUser()
|
|||||||
}
|
}
|
||||||
|
|
||||||
function willBeHidden(post) {
|
function willBeHidden(post) {
|
||||||
// posts without 'msg' may be used for metadata like 'url'
|
// posts without 'msg' and 'rt.msg' may be used for metadata like 'url' and are not meant to be displayed
|
||||||
// and are not meant to be displayed.
|
if (!post.userpost.msg && (!post.userpost.rt || (post.userpost.rt && !post.userpost.rt.msg)))
|
||||||
if (typeof(post['userpost']['msg']) === 'undefined' &&
|
|
||||||
typeof(post['userpost']['rt']) === 'undefined' )
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (post['userpost']['n'] === defaultScreenName)
|
if (post['userpost']['n'] === defaultScreenName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user