From 003bed78221de4f75c35a9c10dbb73c820ee8f0c Mon Sep 17 00:00:00 2001 From: Ryan Nystrom Date: Sun, 4 Mar 2018 21:47:41 -0500 Subject: [PATCH] Prevent crash when hiding view --- MessageViewController/MessageAutocompleteController.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MessageViewController/MessageAutocompleteController.swift b/MessageViewController/MessageAutocompleteController.swift index 50e1e3b..574426b 100644 --- a/MessageViewController/MessageAutocompleteController.swift +++ b/MessageViewController/MessageAutocompleteController.swift @@ -85,10 +85,8 @@ public final class MessageAutocompleteController: MessageTextViewListener { } public final func show(_ doShow: Bool) { - if doShow { - tableView.reloadData() - tableView.layoutIfNeeded() - } + tableView.reloadData() + tableView.layoutIfNeeded() tableView.isHidden = !doShow border.isHidden = !doShow layoutDelegate?.needsLayout(controller: self)