Fix media selection dismissing when deselecting last item.

This commit is contained in:
Cody Henthorne
2022-12-13 14:13:12 -05:00
parent 498b7fee69
commit 6463dca2c6
2 changed files with 7 additions and 2 deletions

View File

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

View File

@@ -12,7 +12,12 @@
tools:layout="@layout/fragment_container">
<action
android:id="@+id/action_mediaCaptureFragment_to_mediaGalleryFragment"
app:destination="@id/mediaGalleryFragment" />
app:destination="@id/mediaGalleryFragment">
<argument
android:name="suppressEmptyError"
android:defaultValue="true"
app:argType="boolean" />
</action>
<action
android:id="@+id/action_mediaCaptureFragment_to_textStoryPostCreationFragment"
app:destination="@id/textStoryPostCreationFragment"