feat(app): redesigned interface, polls, drafts, forwarding and mentions

A new look across the app and a set of everyday messaging features.

Interface
- Home screen with Chats, Contacts and Settings tabs, a large title,
  search across chats and message text (diacritics-insensitive), filters
  and pinned chats.
- Conversation view with a translucent header and composer, grouped
  bubbles, author avatars and colours in groups, swipe to reply, an
  "N new messages" marker, a jump-to-latest button and in-chat search.
- Contact and group profiles: verification, shared photos, groups in
  common, disappearing messages, mute, block; members, admin badges,
  adding people, rename and leave for groups.
- Full-screen photo viewer that pages through the whole conversation.
- A stable avatar colour per person and a clearly visible read state.

Messaging
- Polls in chats and groups, single or multiple choice, with votes that
  can be changed or withdrawn; older clients see them as text.
- Drafts survive leaving a chat and show in the chat list.
- Forwarding of messages, photos, files and voice messages.
- Notes to self: a local-only, encrypted chat that never reaches the
  relay.
- @mentions in groups that notify even when the group is muted.
- Typing indicators sent as ephemeral messages, opt-in and mutual like
  read receipts.
- Delivery and read times per message and per group member.
- Profile photos, cropped, resized and stripped of metadata, delivered
  encrypted to contacts.
- Voice message playback at 1.5x and 2x.
- Call buttons in 1:1 chats and call log entries.

Fixes
- Muted groups no longer notify: muting was checked against the
  author's chat instead of the group.
- A blocked contact could unblock itself by changing its delivery
  address.
- Read receipts no longer regress to delivered when a late delivery
  receipt arrives.
- A message marked as failed corrects itself once it is delivered.
- Double ticks in groups now mean delivered to every member.
This commit is contained in:
Julius Joska
2026-10-03 22:44:53 +02:00
parent 933a74c900
commit 5246a97db2
56 changed files with 12028 additions and 1668 deletions
+20 -2
View File
@@ -63,6 +63,7 @@ class RelayClient {
StreamController<RelayConnectionState>.broadcast();
final _deliverController = StreamController<pb.Envelope>.broadcast();
final _receiptController = StreamController<pb.Receipt>.broadcast();
final _turnController = StreamController<pb.TurnCredentials>.broadcast();
var _state = RelayConnectionState.disconnected;
@@ -340,6 +341,10 @@ class RelayClient {
if (!_receiptController.isClosed) {
_receiptController.add(frame.receipt);
}
} else if (frame.hasTurnCredentials()) {
if (!_turnController.isClosed) {
_turnController.add(frame.turnCredentials);
}
}
},
onDone: _onDisconnected,
@@ -373,10 +378,11 @@ class RelayClient {
}
/// Odešle sealed-sender obálku. Vrací Receipt (STORED_OFFLINE /
/// DELIVERED_ONLINE) spárovaný přes msg_uuid.
/// DELIVERED_ONLINE, u EPHEMERAL i DROPPED) spárovaný přes msg_uuid.
Future<pb.Receipt> sendEnvelope({
required Uint8List dstAddress,
required Uint8List payload,
pb.ContentHint hint = pb.ContentHint.CONTENT_HINT_DEFAULT,
Duration timeout = const Duration(seconds: 10),
}) async {
final msgUuid = randomBytes(16);
@@ -387,13 +393,24 @@ class RelayClient {
envelope: pb.Envelope(
dstAddress: dstAddress,
msgUuid: msgUuid,
contentHint: pb.ContentHint.CONTENT_HINT_DEFAULT,
contentHint: hint,
payload: payload,
),
));
return receiptFuture;
}
/// Dočasné údaje k TURN serveru pro hovor. Relay je vydá jen přihlášenému
/// zařízení; bez TURN na relayi (503) doběhne timeout a hovor zkusí jen
/// přímé spojení přes STUN.
Future<pb.TurnCredentials> requestTurn({
Duration timeout = const Duration(seconds: 5),
}) {
final future = _turnController.stream.first.timeout(timeout);
_send(pb.ClientFrame(turnRequest: pb.TurnRequest()));
return future;
}
/// Potvrdí zpracování obálky — relay ji smaže z fronty. Volat až PO
/// uložení zprávy na disk.
void ack(List<int> msgUuid) {
@@ -437,6 +454,7 @@ class RelayClient {
await stop();
_transport.close();
await _stateController.close();
await _turnController.close();
await _deliverController.close();
await _receiptController.close();
}