Drop state update for unattached fragment.

This commit is contained in:
Alex Hart
2022-08-01 10:08:04 -03:00
committed by Greyson Parrelli
parent 201f314cfb
commit 855d74bbbf

View File

@@ -352,6 +352,7 @@ class StoryViewerPageFragment :
if (context == null) {
Log.d(TAG, "Subscriber called while fragment is detached. Ignoring state update.")
return@subscribe
}
if (state.posts.isNotEmpty() && state.selectedPostIndex in state.posts.indices) {