From a702c8ffbb3a1956b6ace496c1e693e8c29e3417 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Mon, 20 Apr 2020 11:33:38 +0200 Subject: [PATCH] fix crash of rotation in background --- Classes/ChatConversationView.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 34c8db8cb..34b16dcd6 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -226,6 +226,9 @@ static UICompositeViewDescription *compositeDescription = nil; - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) { + return; + } composingVisible = !composingVisible; [self setComposingVisible:!composingVisible withDelay:0];