fix: read back sent copies after the sec 5.6 upstream fix, pinned at 2d65d66

This commit is contained in:
randogoth 2026-09-28 23:49:39 +03:00
parent 52947e153d
commit d6f4c434fa
36 changed files with 4223 additions and 3118 deletions

View file

@ -7,7 +7,6 @@ import "package:smol_mail/presentation/routes/app_router.gr.dart";
import "package:smol_mail/presentation/theme/app_colors.dart";
import "package:smol_mail/shared/utils/avatar_color.dart";
import "package:smol_mail/shared/utils/format.dart";
import "package:smol_mail/smol/proto.dart";
import "package:smol_mail/smol/store.dart";
class MessageTile extends ConsumerWidget {
@ -27,7 +26,7 @@ class MessageTile extends ConsumerWidget {
who = record.recipient ?? "";
} else if (opened.sender != null) {
final known = store.addressForKey(opened.sender!);
who = known ?? "unknown · ${b32encode(opened.sender!).substring(0, 4)}";
who = known ?? "unknown · ${opened.sender!.substring(0, 4)}";
} else {
who = "?";
}

View file

@ -1,4 +1,3 @@
import "dart:typed_data";
import "package:auto_route/auto_route.dart";
import "package:flutter/material.dart";
@ -9,8 +8,8 @@ import "package:smol_mail/presentation/routes/app_router.gr.dart";
import "package:smol_mail/shared/utils/format.dart";
import "package:smol_mail/shared/utils/snackbar.dart";
import "package:smol_mail/smol/client.dart";
import "package:smol_mail/smol/proto.dart";
import "package:smol_mail/smol/store.dart";
import "package:smol_mail/smol/ui.dart";
/// The opened message: trust row (fingerprint and how the sender's key is
/// known), frontmatter fields, and the plain body — smol mail has no HTML.
@ -18,7 +17,7 @@ class MessageView extends ConsumerWidget {
final String folder;
final MailRecord record;
final OpenedRecord opened;
final void Function(Uint8List senderKey)? onNameSender;
final void Function(String senderKey)? onNameSender;
const MessageView({
super.key,
@ -78,7 +77,7 @@ class MessageView extends ConsumerWidget {
],
if (!isSent && senderKey != null) ...[
const SizedBox(height: 10),
_keyBlock(context, "${fingerprint(senderKey)}\n${b32encode(senderKey)}"),
_keyBlock(context, "${fingerprint(senderKey)}\n$senderKey"),
],
const SizedBox(height: 18),
_field(context, isSent ? "To" : "From",