Skip to content
Snippets Groups Projects
Commit fa6eb059 authored by András Kurucz's avatar András Kurucz Committed by Android (Google) Code Review
Browse files

Merge "Replace deprecated conflatedCallbackFlow in HUNViewBinder" into main

parents 3d43dae9 810661ec
No related branches found
No related tags found
No related merge requests found
......@@ -16,13 +16,12 @@
package com.android.systemui.statusbar.notification.ui.viewbinder
import android.util.Log
import com.android.systemui.common.coroutine.ConflatedCallbackFlow
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.shared.HeadsUpRowKey
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.NotificationListViewModel
import com.android.systemui.util.kotlin.sample
import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow
import javax.inject.Inject
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.coroutineScope
......@@ -77,8 +76,7 @@ constructor(private val viewModel: NotificationListViewModel) {
}
private val NotificationStackScrollLayout.isHeadsUpAnimatingAway: Flow<Boolean>
get() =
ConflatedCallbackFlow.conflatedCallbackFlow {
setHeadsUpAnimatingAwayListener { animatingAway -> trySend(animatingAway) }
awaitClose { setHeadsUpAnimatingAwayListener(null) }
}
get() = conflatedCallbackFlow {
setHeadsUpAnimatingAwayListener { animatingAway -> trySend(animatingAway) }
awaitClose { setHeadsUpAnimatingAwayListener(null) }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment