Suppress deselection error when opening gallery from chat.

This commit is contained in:
Alex Hart
2023-01-17 13:25:22 -04:00
committed by Cody Henthorne
parent 3ee889cb79
commit f368e5b133

View File

@@ -37,7 +37,14 @@ class MediaSelectionGalleryFragment : Fragment(R.layout.fragment_container), Med
)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
val isFirst = arguments?.getBoolean("suppressEmptyError") ?: arguments?.getBoolean("first") ?: false
val args = arguments
val isFirst = when {
args == null -> false
args.containsKey("suppressEmptyError") -> args.getBoolean("suppressEmptyError")
args.containsKey("first") -> args.getBoolean("first")
else -> false
}
sharedViewModel.setSuppressEmptyError(isFirst)
mediaGalleryFragment = ensureMediaGalleryFragment()