-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Qrcode port * Add cache flag * tweaks
- Loading branch information
Showing
42 changed files
with
1,608 additions
and
2,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 26 additions & 4 deletions
30
playlet-lib/src/components/Screens/WebAppScreen/GenerateQrCodeTask.bs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
import "pkg:/source/QrCode/QrImage.bs" | ||
import "pkg:/source/utils/StringUtils.bs" | ||
|
||
@asynctask | ||
function GenerateQrCodeTask(input as object) | ||
' TODO:P1 QR Code generation is happening on UI thread and is hanging for a second | ||
' Needs to be properly decoupled from Node logic | ||
qrPoster = input.qrPoster | ||
poster = input.poster | ||
mode = input.mode | ||
text = input.text | ||
qrPoster.text = text | ||
size = input.size | ||
padding = input.padding | ||
|
||
if mode = invalid | ||
mode = QrCode.QRMode.Byte | ||
end if | ||
|
||
if size = invalid | ||
size = 200 | ||
end if | ||
|
||
if padding = invalid | ||
padding = 0 | ||
end if | ||
|
||
qr = new QrCode.QRImage() | ||
imagePath = qr.Generate(text, size, padding, mode) | ||
|
||
if not StringUtils.IsNullOrEmpty(imagePath) | ||
poster.uri = imagePath | ||
end if | ||
end function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
playlet-lib/src/components/lib/QRCode/QRCode/QRBitBuffer/QRBitBuffer.brs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
playlet-lib/src/components/lib/QRCode/QRCode/QRBitBuffer/QRBitBuffer.xml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.