1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

change OMEMO QR code 0 bits to 'space'

This makes the generated QR code a lot better recognizable in my case.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel 2023-03-12 17:38:49 +01:00
parent 091987db94
commit 2936b09a63

View File

@ -915,10 +915,12 @@ cons_show_qrcode(const char* const text)
strcat(pad, "\u2588\u2588");
}
win_println(console, THEME_DEFAULT, "", pad);
win_println(console, THEME_DEFAULT, "", "");
win_println(console, THEME_DEFAULT, "", "");
win_println(console, THEME_DEFAULT, "", "%s", pad);
for (size_t y = 0; y < width; y += ZOOM_SIZE) {
for (size_t x = 0; x < width; x += ZOOM_SIZE) {
strcat(buf, !(*data & 1) ? "\u2588\u2588" : "\u2800\u2800");
strcat(buf, !(*data & 1) ? "\u2588\u2588" : " ");
data++;
}
@ -929,6 +931,8 @@ cons_show_qrcode(const char* const text)
buf[0] = '\0';
}
win_println(console, THEME_DEFAULT, "", "%s", pad);
win_println(console, THEME_DEFAULT, "", "");
win_println(console, THEME_DEFAULT, "", "");
free(pad);
free(buf);