aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-06-20 23:22:41 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-06-20 23:22:41 +0200
commit2d613acd5163c7654506af1e64efefb9ca188c4a (patch)
tree77a3c188d75c8ee6691d0f63e8c7f805984b8e7c
parenteefdc799b929a4d6407737d281c34dd940e2823f (diff)
downloadfeed2imap-go-2d613acd5163c7654506af1e64efefb9ca188c4a.tar.gz
feed2imap-go-2d613acd5163c7654506af1e64efefb9ca188c4a.tar.bz2
feed2imap-go-2d613acd5163c7654506af1e64efefb9ca188c4a.zip
Fixes a bug where cached items get deleted when the feed is empty
Diffstat (limited to '')
-rw-r--r--internal/feed/cache_v1.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/feed/cache_v1.go b/internal/feed/cache_v1.go
index b5d6b3e..656c133 100644
--- a/internal/feed/cache_v1.go
+++ b/internal/feed/cache_v1.go
@@ -85,8 +85,10 @@ func (cf *cachedFeed) Checked(withFailure bool) {
}
func (cf *cachedFeed) Commit() {
- cf.Items = cf.newItems
- cf.newItems = nil
+ if cf.newItems != nil {
+ cf.Items = cf.newItems
+ cf.newItems = nil
+ }
cf.LastCheck = cf.currentCheck
}
tr class='nohover-highlight'> Handle the new useflag format correctly 2008-01-11 r597@Devoty: necoro | 2008-01-10 14:12:35 +0100Necoro1-3/+3 updated todo 2008-01-10 r595@Devoty: necoro | 2008-01-10 04:04:15 +0100Necoro1-52/+3 Re-Introduced etc-proposals 2008-01-09 r586@Devoty: necoro | 2008-01-09 14:54:18 +0100Necoro1-1/+1 Disabled catapult till it is really usable 2007-12-06 r577@Devoty: necoro | 2007-12-06 20:37:36 +0100Necoro1-1/+1 Fixed desktop file 2007-12-06 r572@Devoty: necoro | 2007-11-28 08:48:15 +0100Necoro1-0/+1 2007-11-27 r570@Devoty: necoro | 2007-11-27 02:08:21 +0100Necoro3-84/+108 Added scrollbars to update window