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
def comments(postId: Int) : Future[Seq[CommentNode]] = { | |
val query = for { | |
comment <- Comments if comment.objectId === postId | |
author <- Users if author.id === comment.userId | |
} yield (author, comment) | |
val comments: Future[Seq[Comment]] = for { | |
result <- db.run(query.result) | |
} yield result.map { case (author, comment) => | |
Comment(comment.id, comment.replyToId, author.name, author.site, comment.date, comment.body, comment.bodyHtml) |
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
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
private void fadeOut(final View view) { | |
int sdk = android.os.Build.VERSION.SDK_INT; | |
if(sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) { | |
AlphaAnimation alpha = new AlphaAnimation(1f, 0f); | |
alpha.setDuration(mShortAnimationDuration); | |
alpha.setFillAfter(true); | |
view.startAnimation(alpha); | |
} else { | |
view.animate() |