Skip to content

Commit

Permalink
CR - added content of hide function in onBindViewHolder directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Jan 15, 2024
1 parent dd918db commit 66ad52e
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ class RecyclerViewLogsAdapter(
holder.binding.apply {
textViewTitleActivityLogsList.text = log.name
textViewSubtitleActivityLogsList.text = log.toLegibleStringSize(context)
hideDownloadButton(holder)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
imageViewDownloadActivityLogsList.isVisible = false
}
imageViewShareActivityLogsList.setOnClickListener {
listener.share(log)
}
Expand Down Expand Up @@ -87,11 +89,4 @@ class RecyclerViewLogsAdapter(
fun open(file: File)
fun download(file: File)
}


private fun hideDownloadButton(holder: ViewHolder) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
holder.binding.imageViewDownloadActivityLogsList.isVisible = false
}
}
}

0 comments on commit 66ad52e

Please sign in to comment.