Skip to content
Snippets Groups Projects
Verified Commit 4fc52bb1 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixes issue where a detached fragment would cause a crash

parent cc11a147
No related branches found
No related tags found
No related merge requests found
......@@ -469,7 +469,8 @@ class MessageListFragment : ServiceBoundFragment() {
}
private fun loadMore(initial: Boolean = false, lastMessageId: MsgId? = null) {
requireActivity().runOnUiThread {
// This can be called *after* we’re already detached from the activity
activity?.runOnUiThread {
viewModel.buffer { bufferId ->
if (bufferId > 0 && bufferId != Int.MAX_VALUE) {
if (initial) swipeRefreshLayout.isRefreshing = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment