mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Rebase master
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
e0cd421734
commit
c8b04e659f
4 changed files with 34 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,4 +98,8 @@ internal class OCFileListItemViewHolder(private var binding: ListItemBinding) :
|
|||
init {
|
||||
binding.favoriteAction.drawable.mutate()
|
||||
}
|
||||
|
||||
@Suppress("EmptyFunctionBlock")
|
||||
override fun checkVisibilityOfFileFeaturesLayout() {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue