Skip to content

Commit

Permalink
fix: remove list item placement animation due to occasional visual gl…
Browse files Browse the repository at this point in the history
…itch

closes #1038
  • Loading branch information
lydavid committed Aug 22, 2024
1 parent e060361 commit 0ab917f
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ private fun NowPlayingHistoryContent(
content = {
NowPlayingHistoryCard(
nowPlayingHistory = listItemModel,
modifier = Modifier.animateItemPlacement(),
onClick = {
searchMusicBrainz(
"\"$title\" artist:\"$artist\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ private fun SpotifyHistoryContent(
content = {
SpotifyHistoryCard(
spotifyHistory = listItemModel,
modifier = Modifier.animateItemPlacement(),
onClick = {
clickListItem = this
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ internal fun ColumnScope.CollectionBottomSheetContent(
is CollectionListItemModel -> {
CollectionListItem(
collection = collection,
modifier = Modifier.animateItemPlacement(),
onClick = {
onAddToCollection(collection.id)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ internal fun CollectionListUi(
is CollectionListItemModel -> {
CollectionListItem(
collection = collectionListItemModel,
// TODO: animateItemPlacement messes up UI in emulator
// modifier = Modifier.animateItemPlacement(),
onClick = { onCollectionClick(id) },
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ internal fun CollectionUi(
content = {
AreaListItem(
area = listItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onItemClick(
entity,
Expand All @@ -428,7 +427,6 @@ internal fun CollectionUi(
content = {
InstrumentListItem(
instrument = listItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onItemClick(
entity,
Expand All @@ -451,7 +449,6 @@ internal fun CollectionUi(
content = {
PlaceListItem(
place = listItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onItemClick(
entity,
Expand All @@ -474,7 +471,6 @@ internal fun CollectionUi(
content = {
RecordingListItem(
recording = listItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onItemClick(
entity,
Expand All @@ -497,7 +493,6 @@ internal fun CollectionUi(
content = {
SeriesListItem(
series = listItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onItemClick(
entity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ internal fun TracksByReleaseScreen(
is TrackListItemModel -> {
TrackListItem(
track = listItemModel,
modifier = Modifier.animateItemPlacement(),
onRecordingClick = onRecordingClick,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ internal fun HistoryUi(
is LookupHistoryListItemModel -> {
HistoryListItem(
lookupHistory = listItemModel,
modifier = Modifier.animateItemPlacement(),
onItemClick = onItemClick,
onDeleteItem = onDeleteItem,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import app.cash.paging.compose.LazyPagingItems
import ly.david.musicsearch.shared.domain.listitem.Header
import ly.david.musicsearch.shared.domain.listitem.ListItemModel
Expand All @@ -18,7 +17,6 @@ import ly.david.musicsearch.ui.core.LocalStrings
import ly.david.musicsearch.ui.common.dialog.SimpleAlertDialog
import ly.david.musicsearch.ui.common.paging.ScreenWithPagingLoadingAndError

@OptIn(ExperimentalFoundationApi::class)
@Composable
internal fun SearchHistoryScreen(
lazyPagingItems: LazyPagingItems<ListItemModel>,
Expand Down Expand Up @@ -57,7 +55,6 @@ internal fun SearchHistoryScreen(
is SearchHistoryListItemModel -> {
SearchHistoryListItem(
searchHistory = listItemModel,
modifier = Modifier.animateItemPlacement(),
onItemClick = onItemClick,
onDeleteItem = onDeleteItem,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ fun ArtistsListScreen(
content = {
ArtistListItem(
artist = listItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onItemClick(
MusicBrainzEntity.ARTIST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ fun EventsListScreen(
content = {
EventListItem(
event = eventListItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onEventClick(
MusicBrainzEntity.EVENT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ fun LabelsListScreen(
content = {
LabelListItem(
label = listItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onLabelClick(
MusicBrainzEntity.LABEL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ fun PlacesListScreen(
is PlaceListItemModel -> {
PlaceListItem(
place = placeListItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onPlaceClick(
MusicBrainzEntity.PLACE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ fun RecordingsListScreen(
is RecordingListItemModel -> {
RecordingListItem(
recording = recordingListItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onRecordingClick(
MusicBrainzEntity.RECORDING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ fun ReleasesListScreen(
content = {
ReleaseListItem(
release = releaseListItemModel,
modifier = Modifier.animateItemPlacement(),
showMoreInfo = showMoreInfo,
requestForMissingCoverArtUrl = {
requestForMissingCoverArtUrl(releaseListItemModel.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ fun ReleaseGroupsListScreen(
ReleaseGroupListItem(
releaseGroup = listItemModel,
showType = false,
modifier = Modifier.animateItemPlacement(),
requestForMissingCoverArtUrl = {
requestForMissingCoverArtUrl(listItemModel.id)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ fun WorksListScreen(
content = {
WorkListItem(
work = listItemModel,
modifier = Modifier.animateItemPlacement(),
) {
onWorkClick(
MusicBrainzEntity.WORK,
Expand Down

0 comments on commit 0ab917f

Please sign in to comment.