Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teams: smoother resource remove (fixes #4916) #4917

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

deeppp15
Copy link
Member

@deeppp15 deeppp15 commented Dec 23, 2024

Description

Screenshots

@deeppp15 deeppp15 requested a review from Okuro3499 December 23, 2024 22:52
@deeppp15 deeppp15 changed the title teams: smoother resource remove (fixes #491) teams: smoother resource remove (fixes #4916) Dec 23, 2024
@Okuro3499
Copy link
Collaborator

Okuro3499 commented Jan 5, 2025

@deeppp15 how does this work? was'nt able to figure it out

@@ -25,25 +30,48 @@ class AdapterTeamResource(private val context: Context, private val list: List<R
}

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolderTeamResource {
rowTeamResourceBinding = RowTeamResourceBinding.inflate(LayoutInflater.from(context), parent, false)
return ViewHolderTeamResource(rowTeamResourceBinding)
val binding = RowTeamResourceBinding.inflate(LayoutInflater.from(context), parent, false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is these being renamed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Okuro3499 , reverted variable names

Comment on lines 40 to 47
holder.binding.tvTitle.text = resource.title
holder.binding.tvDescription.text = resource.description

holder.itemView.setOnClickListener {
listener?.openLibraryDetailFragment(list[position])
listener?.openLibraryDetailFragment(resource)
}
rowTeamResourceBinding.ivRemove.setOnClickListener { }
if (!settings.getString("userId", "--").equals(teamCreator, ignoreCase = true)) {
rowTeamResourceBinding.ivRemove.visibility = View.GONE

holder.binding.ivRemove.setOnClickListener {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these ones too from rowTeamResourceBinding to holder.binding.

Copy link
Member Author

@deeppp15 deeppp15 Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Okuro3499 , reverted variable names

@deeppp15 deeppp15 requested a review from Okuro3499 January 6, 2025 07:49
@Okuro3499
Copy link
Collaborator

how does this work? I am a team leader of a team and I can't remove resources even for the teams I am not a team leader
Screen_recording_20250107_171510.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

teams: remove resource
4 participants