Update localization files and improve path map UI

- Added new localization strings for Swedish, Ukrainian, and Chinese languages in app_sv.arb, app_uk.arb, and app_zh.arb respectively.
- Enhanced the path map UI in channel_message_path_screen.dart for better readability and interaction.
- Improved message retry logic in message_retry_service.dart to prevent double-pumping of queues.
- Bumped version number in pubspec.yaml to 9.5.0+13.
- Cleared untranslated strings in untranslated.json to reflect current localization status.
This commit is contained in:
zjs81
2026-06-13 01:58:42 -07:00
parent 815534d409
commit 760d8e1db3
39 changed files with 8823 additions and 7212 deletions
+13 -1
View File
@@ -227,7 +227,13 @@ class MessageRetryService extends ChangeNotifier {
void _onMessageResolved(String messageId, String contactKey) {
if (_resolvedMessages.contains(messageId)) return;
_resolvedMessages.add(messageId);
_activeMessages.remove(messageId);
// If cleanup already removed this message from the active set, it has
// already pumped the queues; avoid double-pumping.
if (!_activeMessages.remove(messageId)) return;
_pumpQueues(contactKey);
}
void _pumpQueues(String contactKey) {
// Pump this contact's queue first, then any other contacts that are waiting.
_sendNextForContact(contactKey);
for (final key in _sendQueue.keys) {
@@ -495,11 +501,17 @@ class MessageRetryService extends ChangeNotifier {
(_, mapping) => mapping.messageId == messageId,
);
_expectedHashToMessageId.removeWhere((_, msgId) => msgId == messageId);
final contactKey = _pendingContacts[messageId]?.publicKeyHex;
_pendingMessages.remove(messageId);
_pendingContacts.remove(messageId);
_attemptPathHistory.remove(messageId);
_timeoutTimers.remove(messageId);
_resolvedMessages.remove(messageId);
// Cancellation (and other cleanup paths) must release the active in-flight
// slot and pump waiting queues so the global cap does not stall forever.
if (_activeMessages.remove(messageId) && contactKey != null) {
_pumpQueues(contactKey);
}
}
void _handleTimeout(String messageId) {