-
Notifications
You must be signed in to change notification settings - Fork 26
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
base: master
Are you sure you want to change the base?
Conversation
@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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
…planet into 4916-teams-resource-removal
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 |
Description
Screenshots
When user is team leader
leader adding removing resources.webm
When user is not team leader