Skip to content

Commit

Permalink
Don't draw active dot indicators for empty pagers.
Browse files Browse the repository at this point in the history
Fixes #1319
  • Loading branch information
koral-- committed Sep 9, 2022
1 parent 13e890a commit a3f2815
Showing 1 changed file with 16 additions and 8 deletions.
Expand Up @@ -113,10 +113,14 @@ fun HorizontalPagerIndicator(
)
}
.size(width = indicatorWidth, height = indicatorHeight)
.background(
color = activeColor,
shape = indicatorShape,
)
.apply {
if (pageCount > 0) {
background(
color = activeColor,
shape = indicatorShape,
)
}
}
)
}
}
Expand Down Expand Up @@ -195,10 +199,14 @@ fun VerticalPagerIndicator(
)
}
.size(width = indicatorWidth, height = indicatorHeight)
.background(
color = activeColor,
shape = indicatorShape,
)
.apply {
if (pageCount > 0) {
background(
color = activeColor,
shape = indicatorShape,
)
}
}
)
}
}

0 comments on commit a3f2815

Please sign in to comment.