Skip to content

Commit

Permalink
fix: Create a dropbox from a sharedWithMe logout user
Browse files Browse the repository at this point in the history
  • Loading branch information
sirambd authored and KevinBoulongne committed May 28, 2024
1 parent aa56745 commit 38d5dfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.view.isGone
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
Expand Down Expand Up @@ -81,8 +82,9 @@ class NewFolderFragment : Fragment() {
}
}

private fun initDropBoxFolder(drive: Drive?) {
binding.dropBox.setOnClickListener {
private fun initDropBoxFolder(drive: Drive?) = binding.dropBox.apply {
isVisible = drive?.sharedWithMe != true
setOnClickListener {
safeNavigate(
if (drive?.pack?.capabilities?.useDropbox == true) R.id.createDropBoxFolderFragment
else R.id.dropBoxBottomSheetDialog
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/fragment_new_folder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@
style="@style/CardViewInfomaniak"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/marginStandard">
android:layout_margin="@dimen/marginStandard"
android:visibility="gone"
tools:visibility="visible">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down

0 comments on commit 38d5dfe

Please sign in to comment.