1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00
Commit graph

21 commits

Author SHA1 Message Date
jvoisin
863e6946e2 perf(storage): truncate strings on go's side instead of pgsql's
There is no need to send the whole title and content to have them truncated on
postgresql's side when we can do this client-side. This should save some
memory on the database's side, as well as some bandwidth
if it's located on another server. And it makes the SQL queries a tad more
readable as well.
2025-06-26 17:28:30 +02:00
jvoisin
109e668ac7 perf(storage): pre-allocate a slice in RefreshFeedEntries 2025-06-20 11:57:04 -07:00
Frédéric Guillot
50395f13ca feat(googlereader): add mark-all-as-read endpoint 2025-05-03 18:38:54 -07:00
Frédéric Guillot
d7c504f48e fix(ui): avoid 500 error and NaN when marking as read a deleted entry
Steps to reproduce:

1. In /unread, open a feed's settings in a new tab. The feed must have unread entries in /unread.
2. In the new tab/window, delete the feed.
3. Without refreshing, mark an entry from the now-deleted feed as read.
4. Result: The total unread count in the UI header switches to NaN.
2025-02-26 16:39:38 -08:00
Frédéric Guillot
38b80d96ea storage: change GetReadTime() function to use entries_feed_id_hash_key index 2024-04-09 20:37:30 -07:00
Frédéric Guillot
fdd1b3f18e database: entry URLs can exceeds btree index size limit 2024-04-04 20:22:23 -07:00
Romain de Laage
b54fe66809 fix: do not store empty tags 2024-03-24 14:50:18 -07:00
jvoisin
863a5b3648 Simplify removeDuplicates
Use a sort+compact construct instead of doing it by hand with a hashmap. The
time complexity is now O(nlogn+n) instead of O(n), and space complexity around
O(logn) instead of O(n+uniq(n)), but it shouldn't matter anyway, since
removeDuplicates is only called to deduplicate tags.
2024-03-18 16:13:32 -07:00
jvoisin
645a817685 Use modern for loops
Go 1.22 introduced a new [for-range](https://go.dev/ref/spec#For_range)
construct that looks a tad better than the usual `for i := 0; i < N; i++`
construct. I also tool the liberty of replacing some
`for i := 0; i < len(myitemsarray); i++ { … myitemsarray[i] …}`
with  `for item := range myitemsarray` when `myitemsarray` contains only pointers.
2024-02-28 19:55:28 -08:00
jvoisin
b054506e3a Use proper prepared statements for ArchiveEntries 2024-02-27 21:25:25 -08:00
Frédéric Guillot
7a8061fc72 Fix regression introduced in PR #2402 2024-02-25 20:45:34 -08:00
jvoisin
bca84bac8b Use an update-where for MarkCategoryAsRead instead of a subquery 2024-02-25 17:50:30 -08:00
jvoisin
66e0eb1bd6 Reformat's ArchiveEntries's query for consistency's sake
And replace the `=ANY` with an `IN`
2024-02-25 17:50:30 -08:00
jvoisin
26d189917e Simplify cleanupEntries' query
- `NOT (hash=ANY(%4))` can be expressed as `hash NOT IN $4`
- There is no need for a subquery operating on the same table,
  moving the conditions out is equivalent.
2024-02-25 17:50:30 -08:00
jvoisin
ccd3955bf4 Format GetReadTime's query for consistency's sake 2024-02-25 17:50:30 -08:00
Shizun Ge
65e2fddfb5 Use variables for the status in the entries table 2023-11-29 19:32:36 -08:00
Frédéric Guillot
e4285c2cba Add API endpoint to update entry title and content 2023-10-06 23:27:19 -07:00
Frédéric Guillot
5774323f2e Add API endpoint to flush history 2023-10-05 22:19:08 -07:00
Frédéric Guillot
c0e954f19d Implement structured logging using log/slog package 2023-09-24 22:37:33 -07:00
Frédéric Guillot
48f6885f44 Add generic webhook integration 2023-09-09 13:11:42 -07:00
Frédéric Guillot
168a870c02 Move internal packages to an internal folder
For reference: https://go.dev/doc/go1.4#internalpackages
2023-08-10 20:29:34 -07:00
Renamed from storage/entry.go (Browse further)