mirror of
https://github.com/metabolist/metatext.git
synced 2024-07-01 19:40:32 +00:00
Disable selection of gap while loading
This commit is contained in:
parent
15d6e10edc
commit
2f888e1968
|
@ -79,12 +79,14 @@ extension CollectionItemsViewModel: CollectionViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public func canSelect(indexPath: IndexPath) -> Bool {
|
public func canSelect(indexPath: IndexPath) -> Bool {
|
||||||
if case let .status(configuration) = items.value[indexPath.section][indexPath.item],
|
switch items.value[indexPath.section][indexPath.item] {
|
||||||
configuration.status.id == collectionService.contextParentId {
|
case let .status(configuration):
|
||||||
return false
|
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 {
|
public func viewModel(indexPath: IndexPath) -> CollectionItemViewModel {
|
||||||
|
|
Loading…
Reference in a new issue