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

[Dependency Updates] Update androidxRecyclerviewVersion to 1.3.0 #18330

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.wordpress.android.ui.sitecreation.domains

import android.view.ViewGroup
import androidx.compose.ui.platform.ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed
import androidx.core.content.ContextCompat
import androidx.core.view.isInvisible
import androidx.recyclerview.widget.RecyclerView
Expand Down Expand Up @@ -58,18 +57,12 @@ sealed class SiteCreationDomainViewHolder<T : ViewBinding>(protected val binding
}
}

@Suppress("ForbiddenComment")
class NewDomainViewHolder(parentView: ViewGroup) :
SiteCreationDomainViewHolder<SiteCreationDomainsItemV2Binding>(
parentView.viewBinding(SiteCreationDomainsItemV2Binding::inflate)
) {
val composeView = binding.composeView

init {
// TODO: Remove this for Compose 1.2.0-beta02+ and RecyclerView 1.3.0-alpha02+
binding.composeView.setViewCompositionStrategy(DisposeOnViewTreeLifecycleDestroyed)
}

fun onBind(uiState: New.DomainUiState) = with(binding) {
composeView.setContent {
AppThemeWithoutBackground {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ class SiteCreationDomainsAdapter(
diffResult.dispatchUpdatesTo(this)
}

@Suppress("ForbiddenComment")
override fun onViewRecycled(holder: SiteCreationDomainViewHolder<*>) {
if (holder is NewDomainViewHolder) {
// TODO: Remove this for Compose 1.2.0-beta02+ and RecyclerView 1.3.0-alpha02+
holder.composeView.disposeComposition()
}
super.onViewRecycled(holder)
}

private class DomainsDiffUtils(
val oldItems: List<ListItemUiState>,
val newItems: List<ListItemUiState>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ext {
androidxLifecycleVersion = '2.5.1'
androidxPercentlayoutVersion = '1.0.0'
androidxPreferenceVersion = '1.2.0'
androidxRecyclerviewVersion = '1.2.1'
androidxRecyclerviewVersion = '1.3.0'
androidxSwipeToRefreshVersion = '1.1.0'
androidxViewpager2Version = '1.0.0'
androidxWorkManagerVersion = "2.7.1"
Expand Down