mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-02 20:53:09 +00:00
Catch NPE on Chat view binding
Resolves: #1960 Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
5cb36d0801
commit
b60de3858b
@ -701,11 +701,17 @@ class ChatController(args: Bundle) :
|
|||||||
showMicrophoneButton(true)
|
showMicrophoneButton(true)
|
||||||
|
|
||||||
binding.messageInputView.messageInput.doAfterTextChanged {
|
binding.messageInputView.messageInput.doAfterTextChanged {
|
||||||
|
try {
|
||||||
if (binding.messageInputView.messageInput.text.isEmpty()) {
|
if (binding.messageInputView.messageInput.text.isEmpty()) {
|
||||||
showMicrophoneButton(true)
|
showMicrophoneButton(true)
|
||||||
} else {
|
} else {
|
||||||
showMicrophoneButton(false)
|
showMicrophoneButton(false)
|
||||||
}
|
}
|
||||||
|
} catch (npe: NullPointerException) {
|
||||||
|
// view binding can be null
|
||||||
|
// since this is called asynchronously and UI might have been destroyed in the meantime
|
||||||
|
Log.i(TAG, "UI destroyed - view binding already gone")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var sliderInitX = 0F
|
var sliderInitX = 0F
|
||||||
|
Loading…
Reference in New Issue
Block a user