fix RecentlyNonNull/Nullable warnings

main
Conny Duck 6 years ago
parent e4a318db12
commit 95e507d489
  1. 4
      app/src/main/java/com/keylesspalace/tusky/LoginActivity.kt
  2. 2
      app/src/main/java/com/keylesspalace/tusky/receiver/SendStatusBroadcastReceiver.kt
  3. 4
      app/src/main/java/com/keylesspalace/tusky/util/ClickableSpanNoUnderline.kt

@ -78,7 +78,7 @@ class LoginActivity : AppCompatActivity(), Injectable {
setContentView(R.layout.activity_login)
if (savedInstanceState != null) {
domain = savedInstanceState.getString(DOMAIN)
domain = savedInstanceState.getString(DOMAIN)!!
clientId = savedInstanceState.getString(CLIENT_ID)
clientSecret = savedInstanceState.getString(CLIENT_SECRET)
}
@ -225,7 +225,7 @@ class LoginActivity : AppCompatActivity(), Injectable {
val code = uri.getQueryParameter("code")
val error = uri.getQueryParameter("error")
domain = preferences.getString(DOMAIN, "")
domain = preferences.getString(DOMAIN, "")!!
if (code != null && domain.isNotEmpty()) {
/* During the redirect roundtrip this Activity usually dies, which wipes out the

@ -139,7 +139,7 @@ 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, "")
}
}

@ -4,8 +4,8 @@ import android.text.TextPaint
import android.text.style.ClickableSpan
abstract class ClickableSpanNoUnderline : ClickableSpan() {
override fun updateDrawState(ds: TextPaint?) {
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds?.isUnderlineText = false
ds.isUnderlineText = false
}
}
Loading…
Cancel
Save