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 Oct 5, 2022
1 parent 13e890a commit 268fea0
Showing 1 changed file with 12 additions and 6 deletions.
Expand Up @@ -113,9 +113,12 @@ fun HorizontalPagerIndicator(
)
}
.size(width = indicatorWidth, height = indicatorHeight)
.background(
color = activeColor,
shape = indicatorShape,
.then(
if (pageCount > 0) Modifier.background(
color = activeColor,
shape = indicatorShape,
)
else Modifier
)
)
}
Expand Down Expand Up @@ -195,9 +198,12 @@ fun VerticalPagerIndicator(
)
}
.size(width = indicatorWidth, height = indicatorHeight)
.background(
color = activeColor,
shape = indicatorShape,
.then(
if (pageCount > 0) Modifier.background(
color = activeColor,
shape = indicatorShape,
)
else Modifier
)
)
}
Expand Down

0 comments on commit 268fea0

Please sign in to comment.