mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Add linebreaks to fingerprint
This commit is contained in:
parent
57a6edadcb
commit
973ec13ad8
1 changed files with 7 additions and 3 deletions
|
@ -351,11 +351,15 @@ utils::humanReadableFingerprint(const std::string &ed25519)
|
|||
QString
|
||||
utils::humanReadableFingerprint(const QString &ed25519)
|
||||
{
|
||||
QStringList fingerprintList;
|
||||
QString fingerprint;
|
||||
for (int i = 0; i < ed25519.length(); i = i + 4) {
|
||||
fingerprintList << ed25519.mid(i, 4);
|
||||
fingerprint.append(ed25519.midRef(i, 4));
|
||||
if (i > 0 && i % 16 == 12)
|
||||
fingerprint.append('\n');
|
||||
else if (i < ed25519.length())
|
||||
fingerprint.append(' ');
|
||||
}
|
||||
return fingerprintList.join(" ");
|
||||
return fingerprint;
|
||||
}
|
||||
|
||||
QString
|
||||
|
|
Loading…
Reference in a new issue