Skip to content

Commit

Permalink
Refactor CommentUserNoteBlock to Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonis Lilis committed Apr 26, 2024
1 parent cf412b9 commit d6fa715
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 302 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,15 +321,17 @@ class NotificationsDetailListFragment : ListFragment(), NotificationFragment {
}
}
}
private val mOnGravatarClickedListener = OnGravatarClickedListener { siteId, _, siteUrl ->
if (!isAdded || activity !is NotificationsDetailActivity) {
return@OnGravatarClickedListener
}
val detailActivity = activity as NotificationsDetailActivity
if (siteId == 0L && !TextUtils.isEmpty(siteUrl)) {
detailActivity.showWebViewActivityForUrl(siteUrl)
} else if (siteId != 0L) {
detailActivity.showBlogPreviewActivity(siteId, note?.isFollowType)
private val mOnGravatarClickedListener = object : OnGravatarClickedListener {
override fun onGravatarClicked(siteId: Long, userId: Long, siteUrl: String?) {
if (!isAdded || activity !is NotificationsDetailActivity) {
return
}
val detailActivity = activity as NotificationsDetailActivity
if (siteId == 0L && !TextUtils.isEmpty(siteUrl)) {
detailActivity.showWebViewActivityForUrl(siteUrl)
} else if (siteId != 0L) {
detailActivity.showBlogPreviewActivity(siteId, note?.isFollowType)
}
}
}

Expand Down

This file was deleted.

Loading

0 comments on commit d6fa715

Please sign in to comment.