Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Star and un-star the read articles #725

Merged
merged 2 commits into from
Nov 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/src/main/java/net/frju/flym/ui/entries/EntryAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package net.frju.flym.ui.entries

import android.annotation.SuppressLint
import android.graphics.Color
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
Expand Down Expand Up @@ -84,7 +85,13 @@ class EntryAdapter(var displayThumbnails: Boolean, private val globalClickListen
date.isEnabled = !entryWithFeed.entry.read
date.text = entryWithFeed.entry.getReadablePublicationDate(context)

favorite_icon.isEnabled = !entryWithFeed.entry.read
if (entryWithFeed.entry.read) {
favorite_icon.setColorFilter(Color.GRAY)
}
else {
favorite_icon.setColorFilter(Color.WHITE)
}

if (entryWithFeed.entry.favorite) {
favorite_icon.setImageResource(R.drawable.ic_star_24dp)
} else {
Expand Down