Fixed crash when post doesn't contain media_attachments (#113)
This commit is contained in:
parent
94635f5b72
commit
5decd6ae12
@ -179,7 +179,6 @@ data class Status(
|
|||||||
nshares.setTypeface(null, Typeface.BOLD)
|
nshares.setTypeface(null, Typeface.BOLD)
|
||||||
|
|
||||||
//Setup images
|
//Setup images
|
||||||
setupPostPics(rootView, request, homeFragment)
|
|
||||||
ImageConverter.setRoundImageFromURL(
|
ImageConverter.setRoundImageFromURL(
|
||||||
rootView,
|
rootView,
|
||||||
this.getProfilePicUrl(),
|
this.getProfilePicUrl(),
|
||||||
@ -187,6 +186,12 @@ data class Status(
|
|||||||
)
|
)
|
||||||
rootView.profilePic.setOnClickListener { account.openProfile(rootView.context) }
|
rootView.profilePic.setOnClickListener { account.openProfile(rootView.context) }
|
||||||
|
|
||||||
|
//Setup post pic only if there are media attachments
|
||||||
|
if(!media_attachments.isNullOrEmpty()) {
|
||||||
|
setupPostPics(rootView, request, homeFragment)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Set comment initial visibility
|
//Set comment initial visibility
|
||||||
rootView.findViewById<LinearLayout>(R.id.commentIn).visibility = View.GONE
|
rootView.findViewById<LinearLayout>(R.id.commentIn).visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user