Merge pull request #767 from hjubb/incognito_keyboard

Use incognito keyboard based on privacy preference in app
This commit is contained in:
Harris 2021-10-13 22:33:52 +00:00 committed by GitHub
commit f87fb2b9bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
} }