Going back from the code view with button
parent
536da24a10
commit
1c27bb45d3
|
|
@ -3,7 +3,7 @@
|
||||||
Simple app to display loyalty cards synced from Catima through GadgetBridge.
|
Simple app to display loyalty cards synced from Catima through GadgetBridge.
|
||||||
The app can display the cards' info (balance, expiration, note, etc.) and tapping on the appropriate field will display the code, if the type is supported.
|
The app can display the cards' info (balance, expiration, note, etc.) and tapping on the appropriate field will display the code, if the type is supported.
|
||||||
|
|
||||||
Double tapping on the code will come back to the visualization of the card's details.
|
To come back to the visualization of the card's details from the code view, simply press the button.
|
||||||
|
|
||||||
Beware that the small screen of the Banglejs 2 cannot render properly complex barcodes (in fact the resolution is very limited to render most barcodes).
|
Beware that the small screen of the Banglejs 2 cannot render properly complex barcodes (in fact the resolution is very limited to render most barcodes).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,12 +90,9 @@ function printLinearCode(binary) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showCode(card) {
|
function showCode(card) {
|
||||||
var listener = (data) => {
|
|
||||||
if(data.double) showCard(card);
|
|
||||||
Bangle.removeListener("tap", listener);
|
|
||||||
};
|
|
||||||
Bangle.on("tap", listener);
|
|
||||||
E.showScroller();
|
E.showScroller();
|
||||||
|
// keeping it on rising edge would come back twice..
|
||||||
|
setWatch(()=>showCard(card), BTN, {edge:"falling"});
|
||||||
// theme independent
|
// theme independent
|
||||||
g.setColor(WHITE).fillRect(0, 0, g.getWidth(), g.getHeight());
|
g.setColor(WHITE).fillRect(0, 0, g.getWidth(), g.getHeight());
|
||||||
switch (card.type) {
|
switch (card.type) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue