diff --git a/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt b/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt index b366c6435145..64dbc259d8f6 100644 --- a/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt +++ b/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt @@ -35,6 +35,7 @@ import android.widget.Toast import androidx.annotation.IdRes import androidx.appcompat.content.res.AppCompatResources import androidx.core.os.bundleOf +import androidx.core.view.isEmpty import androidx.core.view.isVisible import androidx.fragment.app.FragmentManager import androidx.fragment.app.setFragmentResult @@ -199,9 +200,11 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable { private fun displayActions( actions: List ) { - actions.forEach { action -> - val view = inflateActionView(action) - binding.fileActionsList.addView(view) + if (binding.fileActionsList.isEmpty()) { + actions.forEach { action -> + val view = inflateActionView(action) + binding.fileActionsList.addView(view) + } } }