mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
Check that header 'x-chat-last-given' exists
Without that check a null pointer exception occurs if the header is not set. Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
a40e4111e1
commit
d14f4b38ea
@ -39,7 +39,10 @@ class SharedItemsViewModel(private val repository: SharedItemsRepository) : View
|
||||
override fun onSubscribe(d: Disposable) = Unit
|
||||
|
||||
override fun onNext(response: Response<ChatShareOverall>) {
|
||||
|
||||
if(response.headers()["x-chat-last-given"] != null) {
|
||||
chatLastGiven = response.headers()["x-chat-last-given"]!!
|
||||
}
|
||||
|
||||
val mediaItems = response.body()!!.ocs!!.data
|
||||
mediaItems?.forEach {
|
||||
|
Loading…
Reference in New Issue
Block a user