Make new feed items bold

This commit is contained in:
litetex 2021-09-05 19:04:42 +02:00
parent d11129a76b
commit 1b2b3a4f88

View file

@ -23,6 +23,7 @@ import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
import android.content.SharedPreferences import android.content.SharedPreferences
import android.graphics.Typeface
import android.os.Bundle import android.os.Bundle
import android.os.Parcelable import android.os.Parcelable
import android.view.LayoutInflater import android.view.LayoutInflater
@ -567,9 +568,11 @@ class FeedFragment : BaseStateFragment<FeedState>() {
for (i in 0 until groupAdapter.itemCount) { for (i in 0 until groupAdapter.itemCount) {
val item = groupAdapter.getItem(i) as StreamItem val item = groupAdapter.getItem(i) as StreamItem
var typeface = Typeface.DEFAULT
var resid = R.attr.selectableItemBackground var resid = R.attr.selectableItemBackground
if (doCheck) { if (doCheck) {
if (item.streamWithState.stream.uploadDate?.isAfter(updateTime) != false) { if (item.streamWithState.stream.uploadDate?.isAfter(updateTime) != false) {
typeface = Typeface.DEFAULT_BOLD
resid = R.attr.dashed_border resid = R.attr.dashed_border
highlightCount++ highlightCount++
} else { } else {
@ -595,6 +598,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
) )
}.resourceId }.resourceId
) )
viewBinding.itemVideoTitleView.typeface = typeface
} }
} }