Browse Source

Remove animateItemPlacement modifier usage (#10146)

Ivan Iskandar 1 year ago
parent
commit
69aa13bc56

+ 0 - 1
app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt

@@ -190,7 +190,6 @@ private fun ExtensionDetails(
             key = { it.source.id },
         ) { source ->
             SourceSwitchPreference(
-                modifier = Modifier.animateItemPlacement(),
                 source = source,
                 onClickSourcePreferences = onClickSourcePreferences,
                 onClickSource = onClickSource,

+ 0 - 1
app/src/main/java/eu/kanade/presentation/browse/ExtensionFilterScreen.kt

@@ -58,7 +58,6 @@ private fun ExtensionFilterContent(
     ) {
         items(state.languages) { language ->
             SwitchPreferenceWidget(
-                modifier = Modifier.animateItemPlacement(),
                 title = LocaleHelper.getSourceDisplayName(language, context),
                 checked = language in state.enabledLanguages,
                 onCheckedChanged = { onClickLang(language) },

+ 0 - 3
app/src/main/java/eu/kanade/presentation/browse/ExtensionsScreen.kt

@@ -148,14 +148,12 @@ private fun ExtensionContent(
                             }
                         ExtensionHeader(
                             textRes = header.textRes,
-                            modifier = Modifier.animateItemPlacement(),
                             action = action,
                         )
                     }
                     is ExtensionUiModel.Header.Text -> {
                         ExtensionHeader(
                             text = header.text,
-                            modifier = Modifier.animateItemPlacement(),
                         )
                     }
                 }
@@ -167,7 +165,6 @@ private fun ExtensionContent(
                 key = { "extension-${it.hashCode()}" },
             ) { item ->
                 ExtensionItem(
-                    modifier = Modifier.animateItemPlacement(),
                     item = item,
                     onClickItem = {
                         when (it) {

+ 0 - 1
app/src/main/java/eu/kanade/presentation/browse/MigrateSourceScreen.kt

@@ -132,7 +132,6 @@ private fun MigrateSourceList(
             key = { (source, _) -> "migrate-${source.id}" },
         ) { (source, count) ->
             MigrateSourceItem(
-                modifier = Modifier.animateItemPlacement(),
                 source = source,
                 count = count,
                 onClickItem = { onClickItem(source) },

+ 0 - 2
app/src/main/java/eu/kanade/presentation/browse/SourcesFilterScreen.kt

@@ -68,7 +68,6 @@ private fun SourcesFilterContent(
                 contentType = "source-filter-header",
             ) {
                 SourcesFilterHeader(
-                    modifier = Modifier.animateItemPlacement(),
                     language = language,
                     enabled = enabled,
                     onClickItem = onClickLanguage,
@@ -81,7 +80,6 @@ private fun SourcesFilterContent(
                     contentType = { "source-filter-item" },
                 ) { source ->
                     SourcesFilterItem(
-                        modifier = Modifier.animateItemPlacement(),
                         source = source,
                         enabled = "${source.id}" !in state.disabledSources,
                         onClickItem = onClickSource,

+ 0 - 2
app/src/main/java/eu/kanade/presentation/browse/SourcesScreen.kt

@@ -74,12 +74,10 @@ fun SourcesScreen(
                     when (model) {
                         is SourceUiModel.Header -> {
                             SourceHeader(
-                                modifier = Modifier.animateItemPlacement(),
                                 language = model.language,
                             )
                         }
                         is SourceUiModel.Item -> SourceItem(
-                            modifier = Modifier.animateItemPlacement(),
                             source = model.source,
                             onClickItem = onClickItem,
                             onLongClickItem = onLongClickItem,

+ 0 - 1
app/src/main/java/eu/kanade/presentation/category/CategoryScreen.kt

@@ -107,7 +107,6 @@ private fun CategoryContent(
             key = { _, category -> "category-${category.id}" },
         ) { index, category ->
             CategoryListItem(
-                modifier = Modifier.animateItemPlacement(),
                 category = category,
                 canMoveUp = index != 0,
                 canMoveDown = index != categories.lastIndex,

+ 0 - 2
app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt

@@ -123,7 +123,6 @@ private fun HistoryScreenContent(
             when (item) {
                 is HistoryUiModel.Header -> {
                     RelativeDateHeader(
-                        modifier = Modifier.animateItemPlacement(),
                         date = item.date,
                         relativeTime = relativeTime,
                         dateFormat = dateFormat,
@@ -132,7 +131,6 @@ private fun HistoryScreenContent(
                 is HistoryUiModel.Item -> {
                     val value = item.item
                     HistoryItem(
-                        modifier = Modifier.animateItemPlacement(),
                         history = value,
                         onClickCover = { onClickCover(value) },
                         onClickResume = { onClickResume(value) },

+ 0 - 3
app/src/main/java/eu/kanade/presentation/updates/UpdatesUiItem.kt

@@ -53,7 +53,6 @@ internal fun LazyListScope.updatesLastUpdatedItem(
     item(key = "updates-lastUpdated") {
         Box(
             modifier = Modifier
-                .animateItemPlacement()
                 .padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small),
         ) {
             Text(
@@ -90,14 +89,12 @@ internal fun LazyListScope.updatesUiItems(
         when (item) {
             is UpdatesUiModel.Header -> {
                 ListGroupHeader(
-                    modifier = Modifier.animateItemPlacement(),
                     text = item.date,
                 )
             }
             is UpdatesUiModel.Item -> {
                 val updatesItem = item.item
                 UpdatesUiItem(
-                    modifier = Modifier.animateItemPlacement(),
                     update = updatesItem.update,
                     selected = updatesItem.selected,
                     readProgress = updatesItem.update.lastPageRead