Fix return checking for a null

This commit is contained in:
Adolfo Santiago 2022-06-25 11:52:29 +02:00
parent 9ad127db4c
commit 0be36d163c
No known key found for this signature in database
GPG Key ID: 244D6F9A317B4A65
1 changed files with 16 additions and 11 deletions

View File

@ -1,17 +1,22 @@
/* Copyright 2018 Jeremiasz Nelz <remi6397(a)gmail.com>
/*
* Husky -- A Pleroma client for Android
*
* This file is a part of Tusky.
* Copyright (C) 2022 The Husky Developers
* Copyright (C) 2018 Jeremiasz Nelz
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Tusky; if not,
* see <http://www.gnu.org/licenses>. */
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.keylesspalace.tusky.receiver
@ -157,6 +162,6 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() {
private fun getReplyMessage(intent: Intent): CharSequence {
val remoteInput = RemoteInput.getResultsFromIntent(intent)
return remoteInput.getCharSequence(NotificationHelper.KEY_REPLY, "")
return remoteInput?.getCharSequence(NotificationHelper.KEY_REPLY, "") ?: ""
}
}