add icon, also misc improvments
This commit is contained in:
1 parent
baf92ef672
commit
dc9f172d01
41 files changed
+609
-145
No files matched your search
@@ -280,14 +280,13 @@ Uint8List buildSendStatusRequestFrame(Uint8List recipientPubKey) {
|
||||
Uint8List buildSendTextMsgFrame(
|
||||
Uint8List recipientPubKey,
|
||||
String text, {
|
||||
bool forceFlood = false,
|
||||
int attempt = 0,
|
||||
int? timestampSeconds,
|
||||
}) {
|
||||
final textBytes = utf8.encode(text);
|
||||
final timestamp = timestampSeconds ?? (DateTime.now().millisecondsSinceEpoch ~/ 1000);
|
||||
const prefixSize = 6;
|
||||
final safeAttempt = forceFlood ? 3 : (attempt & 0xFF);
|
||||
final safeAttempt = attempt.clamp(0, 3);
|
||||
final frame = Uint8List(1 + 1 + 1 + 4 + prefixSize + textBytes.length + 1);
|
||||
int offset = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user