don't dismiss keyboard when presenting actions

This commit is contained in:
Michael Kirk 2018-07-10 16:16:53 -06:00 committed by Michael Kirk
parent ea179a398b
commit 22fada2457

View file

@ -42,19 +42,20 @@ const UIWindowLevel UIWindowLevel_CallView(void)
return UIWindowLevelNormal + 1.f; return UIWindowLevelNormal + 1.f;
} }
// In front of everything, including the status bar. // In front of the status bar and CallView
const UIWindowLevel UIWindowLevel_ScreenBlocking(void); const UIWindowLevel UIWindowLevel_ScreenBlocking(void);
const UIWindowLevel UIWindowLevel_ScreenBlocking(void) const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
{ {
return UIWindowLevelStatusBar + 2.f; return UIWindowLevelStatusBar + 2.f;
} }
// In front of everything, including the status bar. // In front of everything
const UIWindowLevel UIWindowLevel_MessageActions(void); const UIWindowLevel UIWindowLevel_MessageActions(void);
const UIWindowLevel UIWindowLevel_MessageActions(void) const UIWindowLevel UIWindowLevel_MessageActions(void)
{ {
// TODO This won't cover the keyboard... // Note: To cover the keyboard, this is higher than the ScreenBlocking level,
return UIWindowLevel_ScreenBlocking() - 1; // but this window is hidden when screen protection is shown.
return CGFLOAT_MAX - 100;
} }
@implementation OWSWindowRootViewController @implementation OWSWindowRootViewController
@ -377,11 +378,14 @@ const UIWindowLevel UIWindowLevel_MessageActions(void)
} else if (self.messageActionsViewController) { } else if (self.messageActionsViewController) {
// Show Message Actions // Show Message Actions
[self ensureRootWindowHidden]; [self ensureRootWindowShown];
[self ensureReturnToCallWindowHidden]; [self ensureReturnToCallWindowHidden];
[self ensureCallViewWindowHidden]; [self ensureCallViewWindowHidden];
[self ensureMessageActionsWindowShown]; [self ensureMessageActionsWindowShown];
[self ensureScreenBlockWindowHidden]; [self ensureScreenBlockWindowHidden];
// Don't hide rootWindow so as not to dismiss keyboard.
OWSAssert(!self.rootWindow.isHidden);
} else { } else {
// Show Root Window // Show Root Window