Enable transition to "read" and "unread" states for "in progress" items
This commit is contained in:
parent
d32f49b274
commit
37e58f8b8a
|
@ -380,6 +380,17 @@ public class FeedManager {
|
|||
Log.d(TAG, "Setting item with title " + item.getTitle()
|
||||
+ " as read/unread");
|
||||
item.read = read;
|
||||
|
||||
FeedMedia media = item.getMedia();
|
||||
if (media != null) {
|
||||
if (read) {
|
||||
media.setPlaybackCompletionDate(new Date());
|
||||
} else {
|
||||
media.setPlaybackCompletionDate(null);
|
||||
media.setPosition(0);
|
||||
}
|
||||
}
|
||||
|
||||
setFeedItem(context, item);
|
||||
contentChanger.post(new Runnable() {
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ public class FeedItemMenuHandler {
|
|||
selectedItem.getLink() != null);
|
||||
|
||||
menu.findItem(R.id.mark_unread_item).setVisible(
|
||||
selectedItem.isRead() && AppConfig.DEBUG);
|
||||
menu.findItem(R.id.mark_read_item).setVisible(!selectedItem.isRead());
|
||||
selectedItem.isRead() || selectedItem.isInProgress());
|
||||
menu.findItem(R.id.mark_read_item).setVisible(!selectedItem.isRead() || selectedItem.isInProgress());
|
||||
|
||||
if (selectedItem.getLink() != null) {
|
||||
menu.findItem(R.id.visit_website_item).setVisible(true);
|
||||
|
|
Loading…
Reference in New Issue