Skip to content

Commit

Permalink
Simplify isUnread logic for note visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mkevins committed Feb 6, 2024
1 parent 1a729ca commit d2c57d3
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.core.text.BidiFormatter
import androidx.core.view.ViewCompat
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import org.wordpress.android.R
import org.wordpress.android.WordPress
Expand Down Expand Up @@ -208,11 +209,7 @@ class NotesAdapter(
ImageType.AVATAR_WITH_BACKGROUND,
avatarUrl
)
if (note.isUnread) {
noteViewHolder.unreadNotificationView.visibility = View.VISIBLE
} else {
noteViewHolder.unreadNotificationView.visibility = View.GONE
}
noteViewHolder.unreadNotificationView.isVisible = note.isUnread

// request to load more comments when we near the end
if (onLoadMoreListener != null && position >= itemCount - 1) {
Expand Down

0 comments on commit d2c57d3

Please sign in to comment.