|
|
|
@ -27,16 +27,12 @@ import androidx.compose.foundation.layout.windowInsetsPadding
|
|
|
|
|
import androidx.compose.material.icons.Icons
|
|
|
|
|
import androidx.compose.material.icons.filled.MoreVert
|
|
|
|
|
import androidx.compose.material.icons.filled.Search
|
|
|
|
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
|
|
|
import androidx.compose.material3.MaterialTheme
|
|
|
|
|
import androidx.compose.material3.Scaffold
|
|
|
|
|
import androidx.compose.material3.Text
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
|
import androidx.compose.runtime.collectAsState
|
|
|
|
|
import androidx.compose.runtime.getValue
|
|
|
|
|
import androidx.compose.ui.Alignment
|
|
|
|
|
import androidx.compose.ui.Modifier
|
|
|
|
|
import androidx.compose.ui.graphics.Color
|
|
|
|
|
import androidx.compose.ui.res.stringResource
|
|
|
|
|
import androidx.compose.ui.tooling.preview.Preview
|
|
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
|
@ -176,7 +172,6 @@ private fun InterestsEmptyScreen() {
|
|
|
|
|
Text(text = stringResource(id = R.string.interests_empty_header))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@OptIn(ExperimentalMaterial3Api::class)
|
|
|
|
|
@Preview(name = "phone", device = "spec:shape=Normal,width=360,height=640,unit=dp,dpi=480")
|
|
|
|
|
@Preview(name = "landscape", device = "spec:shape=Normal,width=640,height=360,unit=dp,dpi=480")
|
|
|
|
|
@Preview(name = "foldable", device = "spec:shape=Normal,width=673,height=841,unit=dp,dpi=480")
|
|
|
|
@ -185,10 +180,6 @@ private fun InterestsEmptyScreen() {
|
|
|
|
|
fun InterestsScreenPopulated() {
|
|
|
|
|
NiaTheme {
|
|
|
|
|
NiaBackground {
|
|
|
|
|
Scaffold(
|
|
|
|
|
containerColor = Color.Transparent,
|
|
|
|
|
contentColor = MaterialTheme.colorScheme.onBackground,
|
|
|
|
|
) { padding ->
|
|
|
|
|
InterestsScreen(
|
|
|
|
|
uiState = InterestsUiState.Interests(
|
|
|
|
|
authors = previewAuthors.map { FollowableAuthor(it, false) },
|
|
|
|
@ -202,15 +193,12 @@ fun InterestsScreenPopulated() {
|
|
|
|
|
followTopic = { _, _ -> },
|
|
|
|
|
navigateToAuthor = {},
|
|
|
|
|
navigateToTopic = {},
|
|
|
|
|
switchTab = {},
|
|
|
|
|
modifier = Modifier.padding(padding)
|
|
|
|
|
switchTab = {}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@OptIn(ExperimentalMaterial3Api::class)
|
|
|
|
|
@Preview(name = "phone", device = "spec:shape=Normal,width=360,height=640,unit=dp,dpi=480")
|
|
|
|
|
@Preview(name = "landscape", device = "spec:shape=Normal,width=640,height=360,unit=dp,dpi=480")
|
|
|
|
|
@Preview(name = "foldable", device = "spec:shape=Normal,width=673,height=841,unit=dp,dpi=480")
|
|
|
|
@ -219,10 +207,6 @@ fun InterestsScreenPopulated() {
|
|
|
|
|
fun InterestsScreenLoading() {
|
|
|
|
|
NiaTheme {
|
|
|
|
|
NiaBackground {
|
|
|
|
|
Scaffold(
|
|
|
|
|
containerColor = Color.Transparent,
|
|
|
|
|
contentColor = MaterialTheme.colorScheme.onBackground,
|
|
|
|
|
) { padding ->
|
|
|
|
|
InterestsScreen(
|
|
|
|
|
uiState = InterestsUiState.Loading,
|
|
|
|
|
tabState = InterestsTabState(
|
|
|
|
@ -234,14 +218,11 @@ fun InterestsScreenLoading() {
|
|
|
|
|
navigateToAuthor = {},
|
|
|
|
|
navigateToTopic = {},
|
|
|
|
|
switchTab = {},
|
|
|
|
|
modifier = Modifier.padding(padding)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@OptIn(ExperimentalMaterial3Api::class)
|
|
|
|
|
@Preview(name = "phone", device = "spec:shape=Normal,width=360,height=640,unit=dp,dpi=480")
|
|
|
|
|
@Preview(name = "landscape", device = "spec:shape=Normal,width=640,height=360,unit=dp,dpi=480")
|
|
|
|
|
@Preview(name = "foldable", device = "spec:shape=Normal,width=673,height=841,unit=dp,dpi=480")
|
|
|
|
@ -250,10 +231,6 @@ fun InterestsScreenLoading() {
|
|
|
|
|
fun InterestsScreenEmpty() {
|
|
|
|
|
NiaTheme {
|
|
|
|
|
NiaBackground {
|
|
|
|
|
Scaffold(
|
|
|
|
|
containerColor = Color.Transparent,
|
|
|
|
|
contentColor = MaterialTheme.colorScheme.onBackground,
|
|
|
|
|
) { padding ->
|
|
|
|
|
InterestsScreen(
|
|
|
|
|
uiState = InterestsUiState.Empty,
|
|
|
|
|
tabState = InterestsTabState(
|
|
|
|
@ -264,10 +241,8 @@ fun InterestsScreenEmpty() {
|
|
|
|
|
followTopic = { _, _ -> },
|
|
|
|
|
navigateToAuthor = {},
|
|
|
|
|
navigateToTopic = {},
|
|
|
|
|
switchTab = {},
|
|
|
|
|
modifier = Modifier.padding(padding)
|
|
|
|
|
switchTab = {}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|