Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Fixed cardview was displayed twice in edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jamal2362 committed Aug 25, 2023
1 parent a71bf87 commit 3ebf3e0
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,12 @@ class CollectionAdapter(
// remember previously expanded position
val previousExpandedStationPosition: Int = expandedStationPosition
// if station was expanded - collapse it
if (previousExpandedStationPosition > -1 && previousExpandedStationPosition < collection.stations.size) notifyItemChanged(
previousExpandedStationPosition
)
if (previousExpandedStationPosition > -1 && previousExpandedStationPosition < collection.stations.size)
notifyItemChanged(previousExpandedStationPosition)
// store current station as the expanded one
saveStationListExpandedState(position, stationUuid)
// update station view
notifyItemChanged(expandedStationPosition)
notifyDataSetChanged()
}
}
}
Expand Down

0 comments on commit 3ebf3e0

Please sign in to comment.