Skip to content

Commit

Permalink
Fix bug that caused app to crash
Browse files Browse the repository at this point in the history
  • Loading branch information
woin2ee committed Jan 25, 2024
1 parent 2fb7a06 commit 49046ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changelog/1.4.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Fixed
- Fixed a bug that caused the app to crash when the list button was touched when no words were displayed.
6 changes: 5 additions & 1 deletion Sources/iOSScenes/WordList/WordListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ extension WordListViewController: UISearchControllerDelegate {
extension WordListViewController: UITabBarControllerDelegate {

func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
if viewController == self.navigationController {
guard viewController == self.navigationController else {
return
}

if wordListTableView.visibleCells.count != 0 {
wordListTableView.scrollToRow(at: .init(row: 0, section: 0), at: .bottom, animated: true)
}
}
Expand Down

0 comments on commit 49046ab

Please sign in to comment.