Skip to content

Commit 128949b

Browse files
henrikhkHenrik
andauthored
Only show frameindex when displaying an animated QR code if the mode is not infinite (to avoid showing the frameindex in crypto-psbt mode where it does not make sense). (#240)
Co-authored-by: Henrik <[email protected]>
1 parent 58d1983 commit 128949b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/gui/components/qrcode.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,12 @@ def set_frame(self):
265265
if self.encoder:
266266
payload = self.encoder[self.idx]
267267
self._set_text(payload)
268-
note = "Part %d of %d." % (self.idx + 1, len(self.encoder))
268+
if self.encoder.is_infinite:
269+
note = ""
270+
else:
271+
frameCount = len(self.encoder)
272+
currentFrame = self.idx + 1
273+
note = "Part %d of %d." % (currentFrame, frameCount)
269274
else:
270275
self._set_text(self._text)
271276
note = ""

0 commit comments

Comments
 (0)