Skip to content

Commit 97d97d6

Browse files
committed
Fix indexing issue
1 parent 00842c6 commit 97d97d6

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

app/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ android {
2424
release {
2525
isMinifyEnabled = true
2626
isShrinkResources = true
27+
28+
vcsInfo.include = false
29+
2730
proguardFiles(
2831
getDefaultProguardFile("proguard-android-optimize.txt"),
2932
"proguard-rules.pro"

patternlock/src/main/java/com/mrhwsn/composelock/PatternLock.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ fun PatternLock(
5454
if (canvasSize == Size.Zero) emptyList() else buildList {
5555
val cellW = canvasSize.width / (dimension + 1)
5656
val cellH = canvasSize.height / (dimension + 1)
57-
for (r in 0 until dimension) {
58-
for (c in 0 until dimension) {
57+
for (c in 0 until dimension) {
58+
for (r in 0 until dimension) {
5959
add(
6060
Dot(
61-
id = this.size,
61+
id = this.size + 1,
6262
offset = Offset((c + 1) * cellW, (r + 1) * cellH),
6363
size = Animatable(dotsSize)
6464
)

0 commit comments

Comments
 (0)