mirror of
https://github.com/metabolist/metatext.git
synced 2025-04-15 16:24:10 +00:00
Workaround crash when muting account
This commit is contained in:
parent
b42dd286e6
commit
457bcd7123
1 changed files with 4 additions and 0 deletions
|
@ -98,6 +98,10 @@ public class CollectionItemsViewModel: ObservableObject {
|
|||
|
||||
// swiftlint:disable:next function_body_length cyclomatic_complexity
|
||||
public func viewModel(indexPath: IndexPath) -> Any {
|
||||
guard indexPath.section < lastUpdate.sections.count,
|
||||
indexPath.item < lastUpdate.sections[indexPath.section].items.count else {
|
||||
return false
|
||||
}
|
||||
let item = lastUpdate.sections[indexPath.section].items[indexPath.item]
|
||||
let cachedViewModel = viewModelCache[item]
|
||||
|
||||
|
|
Loading…
Reference in a new issue