mirror of
https://github.com/metabolist/metatext.git
synced 2025-02-16 14:05:14 +00:00
Disable selection of gap while loading
This commit is contained in:
parent
15d6e10edc
commit
2f888e1968
1 changed files with 7 additions and 5 deletions
|
@ -79,12 +79,14 @@ extension CollectionItemsViewModel: CollectionViewModel {
|
|||
}
|
||||
|
||||
public func canSelect(indexPath: IndexPath) -> Bool {
|
||||
if case let .status(configuration) = items.value[indexPath.section][indexPath.item],
|
||||
configuration.status.id == collectionService.contextParentId {
|
||||
return false
|
||||
switch items.value[indexPath.section][indexPath.item] {
|
||||
case let .status(configuration):
|
||||
return configuration.status.id != collectionService.contextParentId
|
||||
case .loadMore:
|
||||
return !((viewModel(indexPath: indexPath) as? LoadMoreViewModel)?.loading ?? false)
|
||||
default:
|
||||
return true
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
public func viewModel(indexPath: IndexPath) -> CollectionItemViewModel {
|
||||
|
|
Loading…
Reference in a new issue