@@ -50,7 +50,6 @@ import androidx.recyclerview.widget.GridLayoutManager
5050import androidx.recyclerview.widget.RecyclerView
5151import com.xwray.groupie.GroupieAdapter
5252import com.xwray.groupie.Item
53- import com.xwray.groupie.OnAsyncUpdateListener
5453import com.xwray.groupie.OnItemClickListener
5554import com.xwray.groupie.OnItemLongClickListener
5655import icepick.State
@@ -139,7 +138,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
139138 val factory = FeedViewModel .Factory (requireContext(), groupId)
140139 viewModel = ViewModelProvider (this , factory).get(FeedViewModel ::class .java)
141140 showPlayedItems = viewModel.getShowPlayedItemsFromPreferences()
142- viewModel.stateLiveData.observe(viewLifecycleOwner, { it?.let (::handleResult) })
141+ viewModel.stateLiveData.observe(viewLifecycleOwner) { it?.let (::handleResult) }
143142
144143 groupAdapter = GroupieAdapter ().apply {
145144 setOnItemClickListener(listenerStreamItem)
@@ -393,14 +392,11 @@ class FeedFragment : BaseStateFragment<FeedState>() {
393392 // This need to be saved in a variable as the update occurs async
394393 val oldOldestSubscriptionUpdate = oldestSubscriptionUpdate
395394
396- groupAdapter.updateAsync(
397- loadedState.items, false ,
398- OnAsyncUpdateListener {
399- oldOldestSubscriptionUpdate?.run {
400- highlightNewItemsAfter(oldOldestSubscriptionUpdate)
401- }
395+ groupAdapter.updateAsync(loadedState.items, false ) {
396+ oldOldestSubscriptionUpdate?.run {
397+ highlightNewItemsAfter(oldOldestSubscriptionUpdate)
402398 }
403- )
399+ }
404400
405401 listState?.run {
406402 feedBinding.itemsList.layoutManager?.onRestoreInstanceState(listState)
0 commit comments