Commit
+5 -1 +/-1 browse
1 | diff --git a/source_miniflux.go b/source_miniflux.go |
2 | index 741de26..e91fabd 100644 |
3 | --- a/source_miniflux.go |
4 | +++ b/source_miniflux.go |
5 | @@ -54,10 +54,14 @@ func (m *MinifluxFeed) Get(ctx context.Context, i int) (*Article, error) { |
6 | return nil, err |
7 | } |
8 | } |
9 | - entries, err := m.client.FeedEntries(m.feedId, &miniflux.Filter{Status: miniflux.EntryStatusUnread}) |
10 | + entries, err := m.client.FeedEntries(m.feedId, &miniflux.Filter{ |
11 | + Status: miniflux.EntryStatusUnread, Direction: "desc", Order: "published_at"}) |
12 | if err != nil { |
13 | return nil, err |
14 | } |
15 | entry := entries.Entries[i] |
16 | + if err := m.client.UpdateEntries([]int64{entry.ID}, "read"); err != nil { |
17 | + return nil, err |
18 | + } |
19 | return &Article{raw: extractText(entry.Content)}, nil |
20 | } |