Created
January 4, 2019 14:40
-
-
Save ashwin-sp/256f3b9f64817a6120631c6cf3ffde5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contentList.forEach { | |
if (it.commentID == -1 && it.feedID == -1) { | |
val content = it | |
FeedItemBindingModel_() | |
.id(it.id) | |
.content(it) | |
.listener(View.OnClickListener { | |
feedID = content.id | |
recycler_view.requestModelBuild() | |
showSoftKeyboard(edit_content) | |
}) | |
.onLiked(View.OnClickListener { | |
contentList[content.id - 1] = Content(content.id, content.by, content.content, contentList[content.id - 1].likeCount + 1, content.feedID, content.commentID) | |
recycler_view.requestModelBuild() | |
}) | |
.addTo(controller) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment