Skip to content

Commit

Permalink
Fix encoded data remembering
Browse files Browse the repository at this point in the history
  • Loading branch information
jklein24 committed Feb 21, 2023
1 parent 570457f commit 1bfd5ab
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion composeqrcode/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GROUP=com.lightspark
POM_ARTIFACT_ID=compose-qr-code
VERSION_NAME=1.0.0
VERSION_NAME=1.0.1

POM_NAME=compose-qr-code
POM_PACKAGING=aar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fun QrCodeView(
dotShape: DotShape = DotShape.Square,
encoder: QrEncoder = QrEncoder()
) {
val encodedData = remember { encoder(data) }
val encodedData = remember(data, encoder) { encoder(data) }

Canvas(modifier = modifier.background(colors.background)) {
encodedData?.let { matrix ->
Expand Down

0 comments on commit 1bfd5ab

Please sign in to comment.