Rebase master

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2023-12-20 15:59:12 +01:00
parent e0cd421734
commit c8b04e659f
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF
4 changed files with 34 additions and 0 deletions

View file

@ -31,6 +31,7 @@ import com.elyeproj.loaderviewlibrary.LoaderImageView
interface ListGridImageViewHolder {
val thumbnail: ImageView
fun showVideoOverlay()
fun checkVisibilityOfFileFeaturesLayout()
val shimmerThumbnail: LoaderImageView
val favorite: ImageView
val localFileIndicator: ImageView

View file

@ -74,4 +74,18 @@ internal class OCFileListGridImageViewHolder(var binding: GridImageBinding) :
init {
binding.favoriteAction.drawable.mutate()
}
@Suppress("ComplexCondition")
override fun checkVisibilityOfFileFeaturesLayout() {
if (favorite.visibility == View.GONE &&
shared.visibility == View.GONE &&
unreadComments.visibility == View.GONE &&
localFileIndicator.visibility == View.GONE &&
checkbox.visibility == View.GONE
) {
fileFeaturesLayout.visibility = View.GONE
} else {
fileFeaturesLayout.visibility = View.VISIBLE
}
}
}

View file

@ -75,4 +75,19 @@ internal class OCFileListGridItemViewHolder(var binding: GridItemBinding) :
init {
binding.favoriteAction.drawable.mutate()
}
@Suppress("ComplexCondition")
override fun checkVisibilityOfFileFeaturesLayout() {
if (favorite.visibility == View.GONE &&
binding.videoOverlay.visibility == View.GONE &&
shared.visibility == View.GONE &&
unreadComments.visibility == View.GONE &&
localFileIndicator.visibility == View.GONE &&
checkbox.visibility == View.GONE
) {
fileFeaturesLayout.visibility = View.GONE
} else {
fileFeaturesLayout.visibility = View.VISIBLE
}
}
}

View file

@ -98,4 +98,8 @@ internal class OCFileListItemViewHolder(private var binding: ListItemBinding) :
init {
binding.favoriteAction.drawable.mutate()
}
@Suppress("EmptyFunctionBlock")
override fun checkVisibilityOfFileFeaturesLayout() {
}
}