Skip to content

Commit 414b1a8

Browse files
committed
Remove unused methods in EmptyStateUtil
1 parent 404d9f3 commit 414b1a8

1 file changed

Lines changed: 0 additions & 42 deletions

File tree

app/src/main/java/org/schabi/newpipe/ui/emptystate/EmptyStateUtil.kt

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22

33
package org.schabi.newpipe.ui.emptystate
44

5-
import androidx.annotation.StringRes
6-
import androidx.compose.runtime.MutableState
7-
import androidx.compose.runtime.State
85
import androidx.compose.ui.platform.ComposeView
96
import androidx.compose.ui.platform.ViewCompositionStrategy
10-
import androidx.compose.ui.res.stringResource
117
import org.schabi.newpipe.ui.theme.AppTheme
12-
import androidx.compose.runtime.mutableStateOf as composeRuntimeMutableStateOf
138

149
@JvmOverloads
1510
fun ComposeView.setEmptyStateComposable(
@@ -25,40 +20,3 @@ fun ComposeView.setEmptyStateComposable(
2520
}
2621
}
2722
}
28-
29-
@JvmOverloads
30-
fun ComposeView.setEmptyStateComposable(
31-
spec: State<EmptyStateSpec>,
32-
strategy: ViewCompositionStrategy = ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed,
33-
) = apply {
34-
setViewCompositionStrategy(strategy)
35-
setContent {
36-
AppTheme {
37-
EmptyStateComposable(
38-
spec = spec.value,
39-
)
40-
}
41-
}
42-
}
43-
44-
/**
45-
* Used in Java land to bridge the [MutableState] API.
46-
*/
47-
fun <T> mutableStateOf(param: T): MutableState<T> {
48-
return composeRuntimeMutableStateOf(param)
49-
}
50-
51-
/**
52-
* Used in Java land to modify [EmptyStateSpec] properties.
53-
* TODO: remove after Kotlin migration
54-
*/
55-
class EmptyStateSpecBuilder(private var spec: EmptyStateSpec) {
56-
57-
fun descriptionText(@StringRes stringRes: Int) = apply {
58-
spec = spec.copy(
59-
descriptionText = { stringResource(id = stringRes) }
60-
)
61-
}
62-
63-
fun build() = spec
64-
}

0 commit comments

Comments
 (0)