mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 10:11:00 +00:00
Fix crash when trying to cache an empty timeline
This commit is contained in:
parent
e278eae144
commit
fcb7ddcbdb
1 changed files with 1 additions and 0 deletions
|
@ -10,6 +10,7 @@ actor TimelineCache {
|
|||
private init() {}
|
||||
|
||||
func set(statuses: [Status], client: Client) {
|
||||
guard !statuses.isEmpty else { return }
|
||||
memoryCache[client] = statuses.prefix(upTo: min(100, statuses.count - 1)).map { $0 }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue