Browse Source

Fix crash in ViewThreadFragment.removeItem (#3622)

pull/3601/merge
Konrad Pozniak 3 years ago committed by GitHub
parent
commit
d2747811be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadFragment.kt

3
app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadFragment.kt

@ -416,7 +416,7 @@ class ViewThreadFragment :
}
public override fun removeItem(position: Int) {
val status = adapter.currentList[position]
adapter.currentList.getOrNull(position)?.let { status ->
if (status.isDetailed) {
// the main status we are viewing is being removed, finish the activity
activity?.finish()
@ -424,6 +424,7 @@ class ViewThreadFragment :
}
viewModel.removeStatus(status)
}
}
override fun onVoteInPoll(position: Int, choices: List<Int>) {
val status = adapter.currentList[position]

Loading…
Cancel
Save