Skip to content

Commit

Permalink
Merge pull request #11683 from nextcloud/backport/11644/stable-3.25
Browse files Browse the repository at this point in the history
[stable-3.25] Prevent having double entries after rotate
  • Loading branch information
AndyScherzinger authored Jun 1, 2023
2 parents cebaca1 + 4572114 commit e7ae066
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -199,9 +200,11 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable {
private fun displayActions(
actions: List<FileAction>
) {
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)
}
}
}

Expand Down

0 comments on commit e7ae066

Please sign in to comment.