Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ enum class StatsCardType(
TODAYS_STATS,
VIEWS_STATS,
MOST_VIEWED_POSTS_AND_PAGES,
MOST_VIEWED_REFERRERS,
LOCATIONS,
AUTHORS,
DEVICES,
UTM
LOCATIONS
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import org.wordpress.android.R
import org.wordpress.android.ui.newstats.components.CardPosition
Expand All @@ -33,7 +34,6 @@ import org.wordpress.android.ui.newstats.components.StatsCardContainer
import org.wordpress.android.ui.newstats.components.StatsCardEmptyContent
import org.wordpress.android.ui.newstats.components.StatsCardErrorContent
import org.wordpress.android.ui.newstats.components.StatsCardHeader
import org.wordpress.android.ui.newstats.components.StatsListHeader
import org.wordpress.android.ui.newstats.util.ShimmerBox

private val CardPadding = 16.dp
Expand Down Expand Up @@ -131,11 +131,6 @@ private fun LoadingContent(
onSelected = onCategoryChanged
)
Spacer(modifier = Modifier.height(12.dp))
StatsListHeader(
leftHeaderResId =
selectedCategory.labelResId
)
Spacer(modifier = Modifier.height(8.dp))
repeat(LOADING_ITEM_COUNT) { index ->
Row(
modifier = Modifier
Expand Down Expand Up @@ -199,9 +194,14 @@ private fun LoadedContent(
if (state.items.isEmpty()) {
StatsCardEmptyContent()
} else {
StatsListHeader(
leftHeaderResId =
selectedCategory.labelResId
Text(
text = stringResource(
R.string.stats_countries_views_header
),
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.End,
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(8.dp))

Expand Down
Loading