fix: respect the incognito flag in the user's preferences

This commit is contained in:
Harris 2021-10-11 14:38:10 +11:00
parent e8a2bbe76d
commit 13dc28231d

View File

@ -70,7 +70,8 @@ class InputBar : RelativeLayout, InputBarEditTextDelegate, QuoteViewDelegate, Li
sendButton.isVisible = false sendButton.isVisible = false
sendButton.onUp = { delegate?.sendMessage() } sendButton.onUp = { delegate?.sendMessage() }
// Edit text // Edit text
inputBarEditText.imeOptions = inputBarEditText.imeOptions or 16777216 // Always use incognito keyboard val incognitoFlag = if (TextSecurePreferences.isIncognitoKeyboardEnabled(context)) 16777216 else 0
inputBarEditText.imeOptions = inputBarEditText.imeOptions or incognitoFlag // Always use incognito keyboard if setting enabled
inputBarEditText.inputType = inputBarEditText.inputType or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES inputBarEditText.inputType = inputBarEditText.inputType or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
inputBarEditText.delegate = this inputBarEditText.delegate = this
} }