14
14
* limitations under the License.
15
15
*/
16
16
17
+ @file:Suppress(" DEPRECATION" )
18
+
17
19
package com.example.jetcaster.ui.home.discover
18
20
19
21
import androidx.compose.animation.core.FloatPropKey
@@ -22,7 +24,6 @@ import androidx.compose.animation.core.LinearOutSlowInEasing
22
24
import androidx.compose.animation.core.TransitionDefinition
23
25
import androidx.compose.animation.core.transitionDefinition
24
26
import androidx.compose.animation.core.tween
25
- import androidx.compose.animation.core.updateTransition
26
27
import androidx.compose.foundation.layout.Column
27
28
import androidx.compose.foundation.layout.Spacer
28
29
import androidx.compose.foundation.layout.fillMaxSize
@@ -36,11 +37,11 @@ import androidx.compose.material.Tab
36
37
import androidx.compose.material.TabPosition
37
38
import androidx.compose.material.Text
38
39
import androidx.compose.runtime.Composable
40
+ import androidx.compose.runtime.DisposableEffect
39
41
import androidx.compose.runtime.collectAsState
40
42
import androidx.compose.runtime.emptyContent
41
43
import androidx.compose.runtime.getValue
42
44
import androidx.compose.runtime.mutableStateOf
43
- import androidx.compose.runtime.onCommit
44
45
import androidx.compose.runtime.remember
45
46
import androidx.compose.runtime.setValue
46
47
import androidx.compose.ui.Modifier
@@ -111,9 +112,10 @@ fun Discover(
111
112
)
112
113
}
113
114
114
- onCommit (selectedCategory) {
115
+ DisposableEffect (selectedCategory) {
115
116
// Update our tracking of the previously selected category
116
117
previousSelectedCategory = selectedCategory
118
+ onDispose {}
117
119
}
118
120
}
119
121
} else {
0 commit comments