Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
fixed crashes and prevent default swipe actions
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgalasko committed Apr 15, 2018
1 parent 1a777a8 commit 909e3df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AfrikaBurn/BurnElementsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ class BurnElementsViewController: UIViewController, UISearchResultsUpdating, UIS
guard let tableView = tableView else {
return
}
if shouldShowEmptyFeedCell {
if shouldShowEmptyFeedCell || tableView.numberOfRows(inSection: 0) == 1 {
tableView.reloadData()
return
}
switch changes {
case .reload:
Expand Down Expand Up @@ -211,7 +212,7 @@ extension BurnElementsViewController: UITableViewDelegate {
@available(iOS 11.0, *)
func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
if shouldShowEmptyFeedCell {
return nil
return UISwipeActionsConfiguration(actions: [])
}

let element = self.element(at: indexPath)
Expand Down

0 comments on commit 909e3df

Please sign in to comment.