diff options
| author | 2024-09-02 18:15:12 +0200 | |
|---|---|---|
| committer | 2024-09-02 18:15:12 +0200 | |
| commit | 7b7659f1fa9d42410c4431caea2096c30169a718 (patch) | |
| tree | 81effc23772f822ce3ad54ff63973ebc8cb46a2f /internal/db/bundb/timeline.go | |
| parent | [chore] Don't try to select zero uncached filters (#3266) (diff) | |
| download | gotosocial-7b7659f1fa9d42410c4431caea2096c30169a718.tar.xz | |
[chore/performance] Further reduce nil uncached queries (#3267)
* [chore/performance] Further reduce nil uncached queries
* more checks
Diffstat (limited to 'internal/db/bundb/timeline.go')
| -rw-r--r-- | internal/db/bundb/timeline.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/db/bundb/timeline.go b/internal/db/bundb/timeline.go index 995c4e84f..1dc9dcf1b 100644 --- a/internal/db/bundb/timeline.go +++ b/internal/db/bundb/timeline.go @@ -351,6 +351,12 @@ func (t *timelineDB) GetListTimeline( return nil, fmt.Errorf("error getting entries for list %s: %w", listID, err) } + // If there's no list entries we can't + // possibly return anything for this list. + if len(listEntries) == 0 { + return make([]*gtsmodel.Status, 0), nil + } + // Extract just the IDs of each follow. followIDs := make([]string, 0, len(listEntries)) for _, listEntry := range listEntries { |
