update to zjs81/dev commit d5f54df

This commit is contained in:
ericz committed 2026-09-21 16:11:40 +02:00
commit cf027c974f
64 files changed
+2972 -1129

No files matched your search

+1 -1
View File
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
+2 -2
View File
@@ -19,8 +19,8 @@ pluginManagement {
plugins { plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.9.1" apply false id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false id("org.jetbrains.kotlin.android") version "2.2.20" apply false
} }
include(":app") include(":app")
+28 -11
View File
@@ -1,6 +1,6 @@
# Privacy Policy for MeshCore Open # Privacy Policy for MeshCore Open
**Last Updated:** January 11, 2026 **Last Updated:** August 23, 2026
## Introduction ## Introduction
@@ -11,16 +11,17 @@ MeshCore Open ("the App") is an open-source Flutter application for communicatin
### Data We Do NOT Collect ### Data We Do NOT Collect
MeshCore Open does **not**: MeshCore Open does **not**:
- Collect personal information - Collect personal information for the developer
- Send data to external servers (except map tile requests)
- Track your usage or behavior - Track your usage or behavior
- Use analytics services - Use analytics services
- Require account creation - Require account creation
- Share any data with third parties - Sell personal information
The App does make limited requests to third-party services when you use features that require internet access, as described below.
### Data Stored Locally on Your Device ### Data Stored Locally on Your Device
The App stores the following data **locally on your device only**: The App stores the following data **locally on your device**:
- **Messages**: Chat messages sent and received through the mesh network - **Messages**: Chat messages sent and received through the mesh network
- **Contacts**: Names and identifiers of mesh network contacts - **Contacts**: Names and identifiers of mesh network contacts
@@ -30,7 +31,7 @@ The App stores the following data **locally on your device only**:
- **Debug Logs**: Optional BLE and app debug logs (if enabled by user) - **Debug Logs**: Optional BLE and app debug logs (if enabled by user)
- **Cached Map Tiles**: Offline map data for the mapping feature - **Cached Map Tiles**: Offline map data for the mapping feature
All locally stored data remains on your device and is never transmitted to us or any third party. This locally stored data is not transmitted to the MeshCore Open developer. Some features may send specific data to third-party services as described in the Third-Party Services section.
## Permissions ## Permissions
@@ -45,12 +46,12 @@ These permissions are used solely to discover and communicate with MeshCore hard
### Location Permission ### Location Permission
- **ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION** - **ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION**
Required by Android for BLE scanning on Android 11 and below. The App does not track or store your location. Location data may be optionally shared over the mesh network if you choose to enable location sharing features. Required by Android for BLE scanning on Android 11 and below. MeshCore Open does not use the phone's GPS to determine your location. Location data shown in the App comes from MeshCore devices and mesh advertisements. Location data may also be optionally shared over the mesh network if you choose to enable location sharing features.
### Internet Permission ### Internet Permission
- **INTERNET** - **INTERNET**
Used only for downloading map tiles from OpenStreetMap tile servers when using the map feature. No personal data is transmitted. Used for features that access third-party internet services, including map tiles, Line-of-Sight elevation lookups, optional model downloads, and optional GIF search.
### Notification Permission ### Notification Permission
- **POST_NOTIFICATIONS** (Android 13+) - **POST_NOTIFICATIONS** (Android 13+)
@@ -65,7 +66,23 @@ Used to maintain BLE connection with your MeshCore device while the app is in th
## Third-Party Services ## Third-Party Services
### Map Tiles ### Map Tiles
The App uses OpenStreetMap tile servers to display maps. When viewing maps, your device's IP address may be visible to the tile server. No other data is shared. See [OpenStreetMap's Privacy Policy](https://wiki.osmfoundation.org/wiki/Privacy_Policy) for more information. The App uses OpenStreetMap and, when selected in settings, Stadia Maps tile servers to display maps. Map tile requests include tile coordinates that identify the geographic area being viewed, and your device's IP address may be visible to the tile provider.
See [OpenStreetMap's Privacy Policy](https://wiki.osmfoundation.org/wiki/Privacy_Policy) and [Stadia Maps' Privacy Policy](https://stadiamaps.com/privacy/) for more information.
### Line-of-Sight Elevation Lookups (Open-Meteo)
When you use the Line-of-Sight (LOS) analysis feature, the App sends latitude and longitude coordinates for points along the selected radio path to the Open-Meteo Elevation API. These coordinates come from MeshCore node positions or locations selected in the map, not from the phone's GPS.
Open-Meteo uses these coordinates to return terrain elevation data needed for the LOS calculation. The request also exposes your device's IP address to Open-Meteo as part of normal internet communication.
LOS elevation lookups are only made when the LOS feature is used. See [Open-Meteo's Terms and Privacy information](https://open-meteo.com/en/terms) for more information.
### Model Downloads (Hugging Face)
The App can download optional translation models and the optional neural image-codec model bundle from Hugging Face when you choose to install or update those models in Settings.
When a model download is requested, the App sends standard HTTP requests for the selected model files to `huggingface.co`. Your device's IP address is visible to Hugging Face as part of normal internet communication. The App does not upload your messages, contacts, mesh location data, or other locally stored content to Hugging Face as part of these model downloads.
Model-download requests are only made when you choose to download or update a model. See [Hugging Face's Privacy Policy](https://huggingface.co/privacy) for more information.
### GIF Search (Giphy) ### GIF Search (Giphy)
The App includes a GIF picker feature powered by Giphy. When you use the GIF search feature: The App includes a GIF picker feature powered by Giphy. When you use the GIF search feature:
@@ -81,7 +98,7 @@ Messages sent through the MeshCore mesh network are transmitted over radio frequ
## Data Security ## Data Security
All data is stored locally on your device using standard Flutter/Android storage mechanisms. The App does not implement additional encryption for locally stored data beyond what the operating system provides. All data stored locally on your device uses standard Flutter/Android storage mechanisms. The App does not implement additional encryption for locally stored data beyond what the operating system provides.
## Children's Privacy ## Children's Privacy
@@ -101,4 +118,4 @@ If you have questions about this Privacy Policy or the App's privacy practices,
--- ---
**Summary**: MeshCore Open is a privacy-respecting app that stores all data locally on your device. We do not collect, track, or share your personal information. **Summary**: MeshCore Open does not use the phone's GPS for location, does not include analytics, and does not collect personal information for the developer. Some optional features communicate with third-party services, including map tile providers, Open-Meteo for LOS elevation lookups, Hugging Face for model downloads, and Giphy for GIF search.
+137 -47
View File
@@ -375,12 +375,14 @@ class MeshCoreConnector extends ChangeNotifier {
List<Channel> _cachedChannels = []; List<Channel> _cachedChannels = [];
final Map<int, bool> _channelSmazEnabled = {}; final Map<int, bool> _channelSmazEnabled = {};
final Map<int, bool> _channelCyr2LatEnabled = {}; final Map<int, bool> _channelCyr2LatEnabled = {};
final Map<int, bool> _channelUrlImagesEnabled = {};
final Map<int, String?> _channelCyr2LatProfileId = {}; final Map<int, String?> _channelCyr2LatProfileId = {};
final Map<int, Region> _channelRegions = {}; final Map<int, Region> _channelRegions = {};
bool _lastSentWasCliCommand = bool _lastSentWasCliCommand =
false; // Track if last sent message was a CLI command false; // Track if last sent message was a CLI command
final Map<String, bool> _contactSmazEnabled = {}; final Map<String, bool> _contactSmazEnabled = {};
final Map<String, bool> _contactCyr2LatEnabled = {}; final Map<String, bool> _contactCyr2LatEnabled = {};
final Map<String, bool> _contactUrlImagesEnabled = {};
final Map<String, String?> _contactCyr2LatProfileId = {}; final Map<String, String?> _contactCyr2LatProfileId = {};
final Set<String> _knownContactKeys = {}; final Set<String> _knownContactKeys = {};
final Map<String, int> _contactUnreadCount = {}; final Map<String, int> _contactUnreadCount = {};
@@ -454,6 +456,13 @@ class MeshCoreConnector extends ChangeNotifier {
); );
} }
Contact? getContactByPubKeyHex(String contactPubKeyHex) {
return _contacts.cast<Contact?>().firstWhere(
(c) => c?.publicKeyHex == contactPubKeyHex,
orElse: () => null,
);
}
List<Contact> get allContacts => List.unmodifiable([ List<Contact> get allContacts => List.unmodifiable([
..._contacts, ..._contacts,
..._discoveredContacts.where( ..._discoveredContacts.where(
@@ -802,6 +811,15 @@ class MeshCoreConnector extends ChangeNotifier {
return _contactSmazEnabled[contactKeyHex] ?? false; return _contactSmazEnabled[contactKeyHex] ?? false;
} }
bool isChannelUrlImagesEnabled(int channelIndex) {
return _channelUrlImagesEnabled[channelIndex] ?? false;
}
bool isContactUrlImagesEnabled(String contactKeyHex) {
_ensureContactUrlImagesSettingLoaded(contactKeyHex);
return _contactUrlImagesEnabled[contactKeyHex] ?? false;
}
bool hasChannelRegion(int channelIndex) { bool hasChannelRegion(int channelIndex) {
return (_channelRegions[channelIndex] ?? '').isNotEmpty; return (_channelRegions[channelIndex] ?? '').isNotEmpty;
} }
@@ -944,6 +962,24 @@ class MeshCoreConnector extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
Future<void> setChannelUrlImagesEnabled(
int channelIndex,
bool enabled,
) async {
_channelUrlImagesEnabled[channelIndex] = enabled;
await _channelSettingsStore.saveUrlImagesEnabled(channelIndex, enabled);
notifyListeners();
}
Future<void> setContactUrlImagesEnabled(
String contactKeyHex,
bool enabled,
) async {
_contactUrlImagesEnabled[contactKeyHex] = enabled;
await _contactSettingsStore.saveUrlImagesEnabled(contactKeyHex, enabled);
notifyListeners();
}
Future<void> setChannelCyr2LatEnabled(int channelIndex, bool enabled) async { Future<void> setChannelCyr2LatEnabled(int channelIndex, bool enabled) async {
_channelCyr2LatEnabled[channelIndex] = enabled; _channelCyr2LatEnabled[channelIndex] = enabled;
if (enabled) { if (enabled) {
@@ -1114,6 +1150,7 @@ class MeshCoreConnector extends ChangeNotifier {
} }
Future<void> loadContactCache() async { Future<void> loadContactCache() async {
_contactUrlImagesEnabled.clear();
final cached = await _contactStore.loadContacts(); final cached = await _contactStore.loadContacts();
_knownContactKeys _knownContactKeys
..clear() ..clear()
@@ -1124,6 +1161,7 @@ class MeshCoreConnector extends ChangeNotifier {
for (final contact in cached) { for (final contact in cached) {
_ensureContactSmazSettingLoaded(contact.publicKeyHex); _ensureContactSmazSettingLoaded(contact.publicKeyHex);
_ensureContactCyr2LatSettingLoaded(contact.publicKeyHex); _ensureContactCyr2LatSettingLoaded(contact.publicKeyHex);
_ensureContactUrlImagesSettingLoaded(contact.publicKeyHex);
} }
} }
@@ -1144,12 +1182,15 @@ class MeshCoreConnector extends ChangeNotifier {
Future<void> loadChannelSettings({int? maxChannels}) async { Future<void> loadChannelSettings({int? maxChannels}) async {
_channelSmazEnabled.clear(); _channelSmazEnabled.clear();
_channelCyr2LatEnabled.clear(); _channelCyr2LatEnabled.clear();
_channelUrlImagesEnabled.clear();
_channelRegions.clear(); _channelRegions.clear();
final channelCount = maxChannels ?? _maxChannels; final channelCount = maxChannels ?? _maxChannels;
for (int i = 0; i < channelCount; i++) { for (int i = 0; i < channelCount; i++) {
_channelSmazEnabled[i] = await _channelSettingsStore.loadSmazEnabled(i); _channelSmazEnabled[i] = await _channelSettingsStore.loadSmazEnabled(i);
_channelCyr2LatEnabled[i] = await _channelSettingsStore _channelCyr2LatEnabled[i] = await _channelSettingsStore
.loadCyr2LatEnabled(i); .loadCyr2LatEnabled(i);
_channelUrlImagesEnabled[i] = await _channelSettingsStore
.loadUrlImagesEnabled(i);
_channelRegions[i] = await _channelRegionStore.loadRegion(i); _channelRegions[i] = await _channelRegionStore.loadRegion(i);
} }
} }
@@ -3170,9 +3211,15 @@ class MeshCoreConnector extends ChangeNotifier {
// Check if this is a reaction - apply locally with pending status and route through retry service // Check if this is a reaction - apply locally with pending status and route through retry service
final reactionInfo = ReactionHelper.parseReaction(text); final reactionInfo = ReactionHelper.parseReaction(text);
if (reactionInfo != null) { if (reactionInfo != null) {
appLogger.info('Sending reaction: ${reactionInfo.identifier()}');
_conversations.putIfAbsent(contact.publicKeyHex, () => []); _conversations.putIfAbsent(contact.publicKeyHex, () => []);
final messages = _conversations[contact.publicKeyHex]!; final messages = _conversations[contact.publicKeyHex]!;
// No check for duplicates. If you want to do it again to resend, you can.
final String reactionID = reactionInfo.identifier();
_processedContactReactions.putIfAbsent(contact.publicKeyHex, () => {});
_processedContactReactions[contact.publicKeyHex]!.add(reactionID);
// Apply reaction locally with pending status // Apply reaction locally with pending status
_processOutgoingContactReaction(messages, reactionInfo, contact); _processOutgoingContactReaction(messages, reactionInfo, contact);
_setReactionStatus( _setReactionStatus(
@@ -3214,7 +3261,7 @@ class MeshCoreConnector extends ChangeNotifier {
translatedLanguageCode: translatedLanguageCode, translatedLanguageCode: translatedLanguageCode,
translationModelId: translationModelId, translationModelId: translationModelId,
); );
_addMessage(contact.publicKeyHex, message); _addMessage(contact.publicKeyHex, message); // recipient as "sender"
notifyListeners(); notifyListeners();
final outboundText = prepareContactOutboundText(contact, text); final outboundText = prepareContactOutboundText(contact, text);
await sendFrame(buildSendTextMsgFrame(contact.publicKey, outboundText)); await sendFrame(buildSendTextMsgFrame(contact.publicKey, outboundText));
@@ -3551,11 +3598,12 @@ class MeshCoreConnector extends ChangeNotifier {
// Check if this is a reaction - if so, process it immediately instead of adding as a message // Check if this is a reaction - if so, process it immediately instead of adding as a message
final reactionInfo = ReactionHelper.parseReaction(text); final reactionInfo = ReactionHelper.parseReaction(text);
if (reactionInfo != null) { if (reactionInfo != null) {
reactionInfo.senderName = selfName;
// Check if we've already processed this reaction // Check if we've already processed this reaction
_processedChannelReactions.putIfAbsent(channel.index, () => {}); _processedChannelReactions.putIfAbsent(channel.index, () => {});
final reactionIdentifier = final reactionIdentifier = reactionInfo.identifier();
'${reactionInfo.targetHash}_${reactionInfo.emoji}';
// Maybe we should allow resending. Recipients can drop duplicates.
if (_processedChannelReactions[channel.index]!.contains( if (_processedChannelReactions[channel.index]!.contains(
reactionIdentifier, reactionIdentifier,
)) { )) {
@@ -3568,27 +3616,32 @@ class MeshCoreConnector extends ChangeNotifier {
final messages = _channelMessages[channel.index]!; final messages = _channelMessages[channel.index]!;
// Process reaction locally to update the UI immediately // Process reaction locally to update the UI immediately
_processReaction(messages, reactionInfo); appLogger.info('Adding sent channel reaction, id: $reactionIdentifier');
await _channelMessageStore.saveChannelMessages(channel.index, messages); final reactionApplied = _processReaction(messages, reactionInfo);
if (reactionApplied) {
await _channelMessageStore.saveChannelMessages(channel.index, messages);
// Mark this reaction as processed // Mark this reaction as processed
_processedChannelReactions[channel.index]!.add(reactionIdentifier); _processedChannelReactions[channel.index]!.add(reactionIdentifier);
notifyListeners(); notifyListeners();
// Send the reaction to the device (don't add as a visible message) // Send the reaction to the device (don't add as a visible message)
final reactionQueueId = _nextReactionSendQueueId(); final reactionQueueId = _nextReactionSendQueueId();
_pendingChannelSentQueue.add(reactionQueueId); _pendingChannelSentQueue.add(reactionQueueId);
await _runScopedChannelSend(() async { await _runScopedChannelSend(() async {
await _waitForRadioQuiet(lastInboundRxTime: _lastChannelMsgRxTime); await _waitForRadioQuiet(lastInboundRxTime: _lastChannelMsgRxTime);
await _sendFrameAndWaitForCommandAck( await _sendFrameAndWaitForCommandAck(
buildSendChannelTextMsgFrame(channel.index, text), buildSendChannelTextMsgFrame(channel.index, text),
channelSendQueueId: reactionQueueId, channelSendQueueId: reactionQueueId,
expectsGenericAck: true, expectsGenericAck: true,
successCode: respCodeSent, successCode: respCodeSent,
); );
}, region: getChannelRegion(channel.index)); }, region: getChannelRegion(channel.index));
return; return;
}
// It looks like a reaction, but we did not find its target, so
// we continue to process it normally.
} }
final message = ChannelMessage.outgoing( final message = ChannelMessage.outgoing(
@@ -5334,6 +5387,8 @@ class MeshCoreConnector extends ChangeNotifier {
await _notificationService.showMessageNotification( await _notificationService.showMessageNotification(
contactName: c?.name ?? 'Unknown', contactName: c?.name ?? 'Unknown',
message: resolvedText, message: resolvedText,
urlImagesEnabled:
c != null && isContactUrlImagesEnabled(c.publicKeyHex),
contactId: msg.senderKeyHex, contactId: msg.senderKeyHex,
badgeCount: getTotalUnreadCount(), badgeCount: getTotalUnreadCount(),
); );
@@ -5348,6 +5403,8 @@ class MeshCoreConnector extends ChangeNotifier {
await _notificationService.showMessageNotification( await _notificationService.showMessageNotification(
contactName: c?.name ?? 'Unknown Room', contactName: c?.name ?? 'Unknown Room',
message: resolvedText, message: resolvedText,
urlImagesEnabled:
c != null && isContactUrlImagesEnabled(c.publicKeyHex),
contactId: msg.senderKeyHex, contactId: msg.senderKeyHex,
badgeCount: getTotalUnreadCount(), badgeCount: getTotalUnreadCount(),
); );
@@ -5498,6 +5555,15 @@ class MeshCoreConnector extends ChangeNotifier {
}); });
} }
void _ensureContactUrlImagesSettingLoaded(String contactKeyHex) {
if (_contactUrlImagesEnabled.containsKey(contactKeyHex)) return;
_contactSettingsStore.loadUrlImagesEnabled(contactKeyHex).then((enabled) {
if (_contactUrlImagesEnabled[contactKeyHex] == enabled) return;
_contactUrlImagesEnabled[contactKeyHex] = enabled;
notifyListeners();
});
}
void _ensureContactCyr2LatProfileLoaded(String contactKeyHex) { void _ensureContactCyr2LatProfileLoaded(String contactKeyHex) {
if (_contactCyr2LatProfileId.containsKey(contactKeyHex)) return; if (_contactCyr2LatProfileId.containsKey(contactKeyHex)) return;
_contactSettingsStore.loadCyr2LatProfileId(contactKeyHex).then((profileId) { _contactSettingsStore.loadCyr2LatProfileId(contactKeyHex).then((profileId) {
@@ -5652,6 +5718,7 @@ class MeshCoreConnector extends ChangeNotifier {
channelName: label, channelName: label,
senderName: message.senderName, senderName: message.senderName,
message: resolvedText, message: resolvedText,
urlImagesEnabled: isChannelUrlImagesEnabled(channelIndex),
channelIndex: message.channelIndex, channelIndex: message.channelIndex,
badgeCount: getTotalUnreadCount(), badgeCount: getTotalUnreadCount(),
); );
@@ -6227,24 +6294,44 @@ class MeshCoreConnector extends ChangeNotifier {
if (reactionInfo != null) { if (reactionInfo != null) {
// Check if we've already processed this exact reaction // Check if we've already processed this exact reaction
_processedContactReactions.putIfAbsent(pubKeyHex, () => {}); _processedContactReactions.putIfAbsent(pubKeyHex, () => {});
final reactionIdentifier = reactionInfo.senderName = _resolveContactSenderName(message, null, false);
'${reactionInfo.targetHash}_${reactionInfo.emoji}'; final reactionIdentifier = reactionInfo.identifier();
final isDuplicate = _processedContactReactions[pubKeyHex]!.contains( final isDuplicate = _processedContactReactions[pubKeyHex]!.contains(
reactionIdentifier, reactionIdentifier,
); );
if (isDuplicate) return;
if (!isDuplicate) { // New reaction - process it
// New reaction - process it // For hashing and dup checking, we use null for sender names in
_processContactReaction(messages, reactionInfo, pubKeyHex); // normal 1:1 chats. This way if we and they have different ideas
// about what their name is, reactions still work. But for reaction
// reports, we want to know who sent what, rather than infer it later,
// so we'll add it to the reactionInfo before storing it.
reactionInfo.senderName ??= message.isOutgoing
? selfName
: getContactByPubKeyHex(pubKeyHex)?.name ?? '???';
final reactionApplied = _processContactReaction(
messages,
reactionInfo,
pubKeyHex,
);
if (reactionApplied) {
appLogger.info('Adding reaction, id: $reactionIdentifier');
_messageStore.saveMessages(pubKeyHex, messages); _messageStore.saveMessages(pubKeyHex, messages);
// Mark as processed // Mark as processed
_processedContactReactions[pubKeyHex]!.add(reactionIdentifier); _processedContactReactions[pubKeyHex]!.add(reactionIdentifier);
notifyListeners(); notifyListeners();
return; // Don't add reaction as a visible message
} }
return; // Don't add reaction as a visible message
// Looks like a reaction, but didn't match any message we have.
// for reactions matching our own format, because those are not very
// informative on their own, but the MC1 format is useful even if
// in raw form, so we'll let those through.
appLogger.info('No match for reaction, id: $reactionIdentifier');
if (reactionInfo.hashType == HashType.ours) return;
} }
messages.add(message); messages.add(message);
@@ -6255,18 +6342,15 @@ class MeshCoreConnector extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
void _processContactReaction( bool _processContactReaction(
List<Message> messages, List<Message> messages,
ReactionInfo reactionInfo, ReactionInfo reactionInfo,
String contactPubKeyHex, String contactPubKeyHex,
) { ) {
final contact = _contacts.cast<Contact?>().firstWhere( final contact = getContactByPubKeyHex(contactPubKeyHex);
(c) => c?.publicKeyHex == contactPubKeyHex,
orElse: () => null,
);
final isRoomServer = contact?.type == advTypeRoom; final isRoomServer = contact?.type == advTypeRoom;
ReactionHelper.applyReaction<Message>( return ReactionHelper.applyReaction<Message>(
messages: messages, messages: messages,
reactionInfo: reactionInfo, reactionInfo: reactionInfo,
// Incoming reactions in 1:1: match against outgoing messages only // Incoming reactions in 1:1: match against outgoing messages only
@@ -6312,10 +6396,7 @@ class MeshCoreConnector extends ChangeNotifier {
) { ) {
final messages = _conversations[pubKeyHex]; final messages = _conversations[pubKeyHex];
if (messages == null) return; if (messages == null) return;
final contact = _contacts.cast<Contact?>().firstWhere( final contact = getContactByPubKeyHex(pubKeyHex);
(c) => c?.publicKeyHex == pubKeyHex,
orElse: () => null,
);
final isRoomServer = contact?.type == advTypeRoom; final isRoomServer = contact?.type == advTypeRoom;
for (int i = messages.length - 1; i >= 0; i--) { for (int i = messages.length - 1; i >= 0; i--) {
final msg = messages[i]; final msg = messages[i];
@@ -6474,27 +6555,36 @@ class MeshCoreConnector extends ChangeNotifier {
final messages = _channelMessages[channelIndex]!; final messages = _channelMessages[channelIndex]!;
// Parse reaction info // Parse reaction info
final reactionInfo = ChannelMessage.parseReaction(message.text); final reactionInfo = message.parseReaction();
if (reactionInfo != null) { if (reactionInfo != null) {
// Check if we've already processed this exact reaction // Check if we've already processed this exact reaction
_processedChannelReactions.putIfAbsent(channelIndex, () => {}); _processedChannelReactions.putIfAbsent(channelIndex, () => {});
final reactionIdentifier = final reactionIdentifier = reactionInfo.identifier();
'${reactionInfo.targetHash}_${reactionInfo.emoji}';
final isDuplicate = _processedChannelReactions[channelIndex]!.contains( final isDuplicate = _processedChannelReactions[channelIndex]!.contains(
reactionIdentifier, reactionIdentifier,
); );
if (!isDuplicate) { if (isDuplicate) return false;
// New reaction - process it
_processReaction(messages, reactionInfo); // New reaction - process it
final reactionApplied = _processReaction(messages, reactionInfo);
if (reactionApplied) {
appLogger.info('Adding channel reaction, id: $reactionIdentifier');
// Save updated messages // Save updated messages
_channelMessageStore.saveChannelMessages(channelIndex, messages); _channelMessageStore.saveChannelMessages(channelIndex, messages);
// Mark as processed // Mark as processed
_processedChannelReactions[channelIndex]!.add(reactionIdentifier); _processedChannelReactions[channelIndex]!.add(reactionIdentifier);
return false; // Don't add reaction as a visible message
} }
return false; // Don't add reaction as a visible message // Looks like a reaction, but didn't match any message we have.
// Old behavior is to silently drop these. We'll continue doing that
// for reactions matching our own format, because those are not very
// informative on their own, but the MC1 format is useful even if
// in raw form, so we'll let those through.
appLogger.info('No match for reaction, id: $reactionIdentifier');
if (reactionInfo.hashType == HashType.ours) return false;
} }
// Parse reply info from message text // Parse reply info from message text
@@ -6596,11 +6686,11 @@ class MeshCoreConnector extends ChangeNotifier {
return null; return null;
} }
void _processReaction( bool _processReaction(
List<ChannelMessage> messages, List<ChannelMessage> messages,
ReactionInfo reactionInfo, ReactionInfo reactionInfo,
) { ) {
ReactionHelper.applyReaction<ChannelMessage>( return ReactionHelper.applyReaction<ChannelMessage>(
messages: messages, messages: messages,
reactionInfo: reactionInfo, reactionInfo: reactionInfo,
shouldSkip: (_) => false, shouldSkip: (_) => false,
+340
View File
@@ -0,0 +1,340 @@
import 'dart:async';
import 'dart:collection';
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:http/http.dart' as http;
/// Finds and renders image URLs embedded in ordinary text messages.
///
/// This is deliberately separate from MeshCore's transmitted channel-image
/// protocol, which is handled by [ReceivedImageStore].
class MessageUrlImageHelper {
static final Map<String, Future<bool>> _verifiedImageCache =
<String, Future<bool>>{};
static const int _maxMessageImageCacheEntries = 200;
static final LinkedHashMap<String, Future<String?>> _messageImageCache =
LinkedHashMap<String, Future<String?>>();
/// HTTP client used to resolve sharing pages.
///
/// Tests override this because `flutter_test` blocks real network requests.
@visibleForTesting
static http.Client? httpClient;
static final RegExp _pyxPattern = RegExp(
r'''https?://pyx\.li/\?i=([A-Za-z0-9_-]+)''',
caseSensitive: false,
);
static final RegExp _ipfsUrlPattern = RegExp(
r'''https?://[^\s<>'"`]+/(?:ipfs|ipns)/[^\s<>'"`]+''',
caseSensitive: false,
);
static final RegExp _ipfsCidPattern = RegExp(
r'''ipfs:(?://)?([^\s<>'"`]+)''',
caseSensitive: false,
);
static final RegExp _ibbSharePattern = RegExp(
r'''https?://(?:www\.)?ibb\.co/[^\s<>'"`/?#]+(?:[/?#][^\s<>'"`]*)?''',
caseSensitive: false,
);
static final RegExp _imagePattern = RegExp(
r'''https?://[^\s<>'"`]+?\.(?:png|jpe?g|webp)(?:\?[^\s<>'"`]+)?(?:#[^\s<>'"`]+)?''',
caseSensitive: false,
);
/// Checks locally whether [text] contains a URL format this helper supports.
/// This deliberately does not resolve sharing pages or fetch image data.
static bool hasPotentialImageUrl(String text) {
return _pyxPattern.hasMatch(text) ||
_ipfsUrlPattern.hasMatch(text) ||
_ipfsCidPattern.hasMatch(text) ||
_ibbSharePattern.hasMatch(text) ||
_imagePattern.hasMatch(text);
}
static Future<String?> parse(String text) async {
final trimmed = text.trim();
if (trimmed.isEmpty) return null;
final pyxMatch = _pyxPattern.firstMatch(trimmed);
if (pyxMatch != null) {
return 'https://pyx.li/i/${pyxMatch.group(1)!}.jpg';
}
final ipfsUrlMatch = _ipfsUrlPattern.firstMatch(trimmed);
if (ipfsUrlMatch != null) {
return _trimBoundary(ipfsUrlMatch.group(0)!);
}
final ipfsCidMatch = _ipfsCidPattern.firstMatch(trimmed);
if (ipfsCidMatch != null) {
final cid = _trimBoundary(ipfsCidMatch.group(1)!);
return 'https://ipfs.io/ipfs/$cid';
}
final ibbMatch = _ibbSharePattern.firstMatch(trimmed);
if (ibbMatch != null) {
return _extractFromUrl(
_trimBoundary(ibbMatch.group(0)!),
RegExp(
r'''<meta[^>]+property=["']og:image["'][^>]+content=["']([^"']+)["']''',
caseSensitive: false,
),
);
}
final imageMatch = _imagePattern.firstMatch(trimmed);
if (imageMatch != null) {
return _trimBoundary(imageMatch.group(0)!);
}
return null;
}
static Future<String?> parseVerified(String text) async {
final imageUrl = await parse(text);
if (imageUrl == null) return null;
final verified = await _verifyImageUrl(imageUrl);
return verified ? imageUrl : null;
}
/// Caches successful URL-image parsing by stable message identity.
///
/// Null results are evicted so temporary connectivity or host failures can
/// be retried when a message is shown again.
static Future<String?> parseVerifiedForMessage(
String messageId,
String text,
) {
final cached = _messageImageCache.remove(messageId);
if (cached != null) {
_messageImageCache[messageId] = cached;
return cached;
}
final parsing = parseVerified(text);
_messageImageCache[messageId] = parsing;
parsing.then((imageUrl) {
if (imageUrl == null &&
identical(_messageImageCache[messageId], parsing)) {
_messageImageCache.remove(messageId);
} else if (imageUrl != null) {
while (_messageImageCache.length > _maxMessageImageCacheEntries) {
_messageImageCache.remove(_messageImageCache.keys.first);
}
}
});
return parsing;
}
static Future<String?> _extractFromUrl(String pageUrl, RegExp pattern) async {
try {
final uri = Uri.parse(pageUrl);
final client = httpClient;
final response = await (client == null ? http.get(uri) : client.get(uri))
.timeout(const Duration(seconds: 8));
if (response.statusCode < 200 || response.statusCode >= 300) {
return null;
}
final value = pattern.firstMatch(response.body)?.group(1);
if (value == null || value.isEmpty) return null;
final imageUrl = uri.resolve(value.replaceAll('&amp;', '&'));
return imageUrl.scheme == 'http' || imageUrl.scheme == 'https'
? imageUrl.toString()
: null;
} catch (_) {
return null;
}
}
static String _trimBoundary(String value) {
return value.trim().replaceAll(RegExp(r"[.,;:!?]+$"), '');
}
static Future<bool> _verifyImageUrl(String imageUrl) {
final cached = _verifiedImageCache[imageUrl];
if (cached != null) return cached;
final verification = _tryLoadImage(imageUrl);
_verifiedImageCache[imageUrl] = verification;
verification.then((verified) {
if (!verified && identical(_verifiedImageCache[imageUrl], verification)) {
_verifiedImageCache.remove(imageUrl);
}
});
return verification;
}
static Future<bool> _tryLoadImage(String imageUrl) async {
final completer = Completer<bool>();
final stream = CachedNetworkImageProvider(
imageUrl,
).resolve(const ImageConfiguration());
late final ImageStreamListener listener;
listener = ImageStreamListener(
(_, _) {
if (!completer.isCompleted) completer.complete(true);
stream.removeListener(listener);
},
onError: (_, _) {
if (!completer.isCompleted) completer.complete(false);
stream.removeListener(listener);
},
);
stream.addListener(listener);
return completer.future.timeout(
const Duration(seconds: 8),
onTimeout: () {
stream.removeListener(listener);
return false;
},
);
}
}
class MessageUrlImageFutureBuilder extends StatefulWidget {
const MessageUrlImageFutureBuilder({
super.key,
required this.messageId,
required this.text,
required this.builder,
});
final String messageId;
final String text;
final AsyncWidgetBuilder<String?> builder;
@override
State<MessageUrlImageFutureBuilder> createState() =>
_MessageUrlImageFutureBuilderState();
}
class _MessageUrlImageFutureBuilderState
extends State<MessageUrlImageFutureBuilder> {
late Future<String?> _imageFuture;
@override
void initState() {
super.initState();
_imageFuture = MessageUrlImageHelper.parseVerifiedForMessage(
widget.messageId,
widget.text,
);
}
@override
void didUpdateWidget(covariant MessageUrlImageFutureBuilder oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.messageId != widget.messageId) {
_imageFuture = MessageUrlImageHelper.parseVerifiedForMessage(
widget.messageId,
widget.text,
);
}
}
@override
Widget build(BuildContext context) {
return FutureBuilder<String?>(
future: _imageFuture,
builder: widget.builder,
);
}
}
class MessageUrlImagePreview extends StatelessWidget {
const MessageUrlImagePreview({super.key, required this.imageUrl});
final String imageUrl;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (context) => Dialog(
insetPadding: const EdgeInsets.all(12),
backgroundColor: Colors.black,
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: Stack(
children: [
Positioned.fill(
child: InteractiveViewer(
boundaryMargin: const EdgeInsets.all(80),
minScale: 1.0,
maxScale: 3.0,
child: Center(
child: CachedNetworkImage(
imageUrl: imageUrl,
fit: BoxFit.contain,
placeholder: (context, url) => const Center(
child: CircularProgressIndicator(strokeWidth: 2),
),
errorWidget: (context, url, error) => const Center(
child: Icon(
Icons.broken_image,
color: Colors.white,
),
),
),
),
),
),
Positioned(
top: 12,
right: 12,
child: IconButton(
onPressed: () => Navigator.of(context).pop(),
icon: const Icon(Icons.close, color: Colors.white),
style: IconButton.styleFrom(
backgroundColor: Colors.black54,
),
),
),
],
),
),
),
);
},
child: ClipRRect(
borderRadius: BorderRadius.circular(12),
child: SizedBox(
width: 240,
height: 240,
child: CachedNetworkImage(
imageUrl: imageUrl,
fit: BoxFit.contain,
placeholder: (context, url) => ColoredBox(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
child: const Center(
child: CircularProgressIndicator(strokeWidth: 2),
),
),
errorWidget: (context, url, error) => Container(
padding: const EdgeInsets.all(12),
color: Theme.of(context).colorScheme.surfaceContainerHighest,
child: Text(
'Unable to load image',
style: Theme.of(context).textTheme.bodySmall,
),
),
),
),
),
);
}
}
+143 -10
View File
@@ -1,10 +1,29 @@
import 'dart:typed_data';
import 'dart:convert';
import 'package:characters/characters.dart';
import 'package:crypto/crypto.dart';
import 'package:base32/base32.dart';
import 'package:base32/encodings.dart';
import '../widgets/emoji_picker.dart'; import '../widgets/emoji_picker.dart';
enum HashType { ours, mc1 }
class ReactionInfo { class ReactionInfo {
final String targetHash; final String targetHash;
final String emoji; final String emoji;
HashType hashType;
String? senderName; // Who sent the reaction
ReactionInfo({required this.targetHash, required this.emoji}); ReactionInfo({
required this.targetHash,
required this.emoji,
required this.hashType,
this.senderName,
});
String identifier() {
return '$targetHash:$emoji:$hashType:${senderName ?? ""}';
}
} }
class ReactionHelper { class ReactionHelper {
@@ -26,25 +45,34 @@ class ReactionHelper {
required int Function(T) getTimestampSecs, required int Function(T) getTimestampSecs,
required String? Function(T) getSenderName, required String? Function(T) getSenderName,
required String Function(T) getMessageText, required String Function(T) getMessageText,
required Map<String, int> Function(T) getReactions, required Map<String, List<String?>> Function(T) getReactions,
required bool Function(T) shouldSkip, required bool Function(T) shouldSkip,
required void Function(int index, Map<String, int> newReactions)
updateMessage, updateMessage,
}) { }) {
final targetHash = reactionInfo.targetHash; final targetHash = reactionInfo.targetHash;
final hashFunc = switch (reactionInfo.hashType) {
HashType.ours => computeReactionHash,
HashType.mc1 => ((ts, senderName, text) => _concatenateHashAndSender(
computeReactionHashMC1(ts, senderName, text),
senderName,
)),
};
for (int i = messages.length - 1; i >= 0; i--) { for (int i = messages.length - 1; i >= 0; i--) {
final msg = messages[i]; final msg = messages[i];
if (shouldSkip(msg)) continue; if (shouldSkip(msg)) continue;
final msgHash = computeReactionHash( final msgHash = hashFunc(
getTimestampSecs(msg), getTimestampSecs(msg),
getSenderName(msg), getSenderName(msg),
getMessageText(msg), getMessageText(msg),
); );
if (msgHash == targetHash) { if (msgHash == targetHash) {
final currentReactions = Map<String, int>.from(getReactions(msg)); final currentReactions = Map<String, List<String?>>.from(
currentReactions[reactionInfo.emoji] = getReactions(msg),
(currentReactions[reactionInfo.emoji] ?? 0) + 1; );
(currentReactions[reactionInfo.emoji] ??= []).add(
reactionInfo.senderName,
);
updateMessage(i, currentReactions); updateMessage(i, currentReactions);
return true; return true;
} }
@@ -97,17 +125,122 @@ class ReactionHelper {
return hash.toRadixString(16).padLeft(4, '0'); return hash.toRadixString(16).padLeft(4, '0');
} }
// Compute the type of reaction hash used by MeshCoreOne.
static String computeReactionHashMC1(
int timestampSeconds,
String? senderName,
String messageText,
) {
// raw hash is first 5 bytes of SHA-256(UTF-8 text + uint32-LE sender timestamp)
Uint8List messageBytes = utf8.encode(messageText);
ByteData timestampBytes = ByteData(4)
..setUint32(0, timestampSeconds, Endian.little);
final hash = sha256
.convert(messageBytes + timestampBytes.buffer.asUint8List())
.bytes
.sublist(0, 5);
// encode as 8 chars of Crockford base32
return base32
.encode(Uint8List.fromList(hash), encoding: Encoding.crockford)
.toLowerCase();
// Note: Crockford32 defines permissive decoding and allows some
// substitutions (e.g. I, i, l -> 1) but we never decode the hashes, we
// just compare them. If someone sends a miscoded hash that should be
// equivalent, we won't match it and it won't work. But it's not worth
// accommodating, because no one is going to be hand copying hashes.
}
// MeshCoreOne-style reaction hashes don't depend on the sender name,
// and we're expected to check the hash and sender name separately.
// Our own reaction hashes include it. Rather than store the sender
// Name in ReactionInfo and complicate the logic in applyReaction(),
// we just tack the senderName onto the end of the "hash".
static String _concatenateHashAndSender(String hash, String? senderName) {
return "$hash:${senderName ?? ''}";
}
static ReactionInfo? parseReaction(String text) {
return parseReactionOurs(text) ??
parseReactionMC1(text) ??
parseReactionMC1Legacy(text);
}
static bool _looksLikeEmoji(String emoji) {
// Make sure it's a single grapheme.
if (Characters(emoji).length > 1) return false;
// Below are some emoji-validating tests, copied from MeshTrax.
// https://github.com/venamartin/meshtrax/
// It's nice to avoid false positives just to save us some processing,
// but it's not crucial, as we will either apply a reaction or show it
// as a message. Text that is not actually a hash is unlikely to match
// a message.
if (emoji.isEmpty) return false;
// Emoji, not prose: nearly all emoji start at U+2000 or above; the
// exceptions (keycaps, ©/®) carry a variation selector U+FE0F or a
// combining keycap U+20E3. Ordinary ASCII text fails both tests.
if (!(emoji.runes.first >= 0x2000 ||
emoji.runes.any((r) => r == 0xFE0F || r == 0x20E3))) {
return false;
}
return true;
}
static ReactionInfo? parseReactionMC1(String text) {
// See https://github.com/Avi0n/MeshCoreOne/blob/main/docs/Reactions.md
// This regex matches both the channel format, which includes the sender name,
// and the chat (DM) format, which omits it.
final regex = RegExp(r'^(?:@\[(.*)])?(.+?)\n([a-tv-zA-TV-Z0-9]{8})$');
final match = regex.firstMatch(text);
if (match == null) return null;
final senderName = match.group(1);
final emoji = match.group(2)!;
final hash = match.group(3)?.toLowerCase();
if (!_looksLikeEmoji(emoji)) return null;
return ReactionInfo(
targetHash: _concatenateHashAndSender(hash!, senderName),
emoji: emoji,
hashType: HashType.mc1,
);
}
static ReactionInfo? parseReactionMC1Legacy(String text) {
// See https://github.com/Avi0n/MeshCoreOne/blob/main/docs/Reactions.md
// This regex matches both the channel format, which includes the sender name,
// and the chat (DM) format, which omits it.
final regex = RegExp(r'^(.+?)(?:@\[(.*)])?\n([a-tv-zA-TV-Z0-9]{8})$');
final match = regex.firstMatch(text);
if (match == null) return null;
final hash = match.group(3)?.toLowerCase();
final senderName = match.group(2);
final emoji = match.group(1)!;
if (!_looksLikeEmoji(emoji)) return null;
return ReactionInfo(
targetHash: _concatenateHashAndSender(hash!, senderName),
emoji: emoji,
hashType: HashType.mc1,
);
}
/// Parse reaction format: r:HASH:INDEX (where INDEX is 2-char hex emoji index) /// Parse reaction format: r:HASH:INDEX (where INDEX is 2-char hex emoji index)
/// Returns null if text is not a valid reaction format /// Returns null if text is not a valid reaction format
static ReactionInfo? parseReaction(String text) { static ReactionInfo? parseReactionOurs(String text) {
final regex = RegExp(r'^r:([0-9a-f]{4}):([0-9a-f]{2})$'); final regex = RegExp(r'^r:([0-9a-f]{4}):([0-9a-f]{2})$');
final match = regex.firstMatch(text); final match = regex.firstMatch(text);
if (match == null) return null; if (match == null) return null;
final emoji = indexToEmoji(match.group(2)!); final emoji = indexToEmoji(match.group(2)!);
if (emoji == null) return null; if (emoji == null) return null;
return ReactionInfo(
return ReactionInfo(targetHash: match.group(1)!, emoji: emoji); targetHash: match.group(1)!,
emoji: emoji,
hashType: HashType.ours,
);
} }
/// Encode a reaction message that parseReaction() can parse. /// Encode a reaction message that parseReaction() can parse.
+2 -1
View File
@@ -485,6 +485,7 @@
} }
} }
}, },
"chat_selectSendAction": "Изберете действие за изпращане",
"chat_sendGif": "Изпрати GIF", "chat_sendGif": "Изпрати GIF",
"chat_reply": "Отговори", "chat_reply": "Отговори",
"chat_addReaction": "Добави Реакция", "chat_addReaction": "Добави Реакция",
@@ -2791,7 +2792,7 @@
"channels_regionNotSet": "Регион: ние", "channels_regionNotSet": "Регион: ние",
"channels_regionSelect_Title": "Выберете регион", "channels_regionSelect_Title": "Выберете регион",
"channels_clearRegion": "Чиста зона", "channels_clearRegion": "Чиста зона",
"chat_sendImage": "Изпрати изображение", "chat_sendImageLora": "Изпращане на изображение чрез MeshCore",
"chat_imagePickFailed": "Не мог да откривам та изображин", "chat_imagePickFailed": "Не мог да откривам та изображин",
"chat_receivedGif": "Получил GIF", "chat_receivedGif": "Получил GIF",
"repeater_keySettings": "Изменяне на идентичности ключа", "repeater_keySettings": "Изменяне на идентичности ключа",
+4 -1
View File
@@ -507,6 +507,7 @@
} }
} }
}, },
"chat_selectSendAction": "Sendeaktion auswählen",
"chat_sendGif": "GIF senden", "chat_sendGif": "GIF senden",
"chat_reply": "Antworten", "chat_reply": "Antworten",
"chat_addReaction": "Reaktion hinzufügen", "chat_addReaction": "Reaktion hinzufügen",
@@ -2660,6 +2661,8 @@
"messageStatus_pending": "Wird gesendet", "messageStatus_pending": "Wird gesendet",
"messageStatus_failed": "Senden fehlgeschlagen", "messageStatus_failed": "Senden fehlgeschlagen",
"messageStatus_repeated": "Mehrfach gehört", "messageStatus_repeated": "Mehrfach gehört",
"urlImage_enable": "URL-Bilder anzeigen",
"urlImage_possible": "Mögliches URL-Bild; in den Einstellungen aktivieren.",
"contacts_moreOptions": "Weitere Optionen", "contacts_moreOptions": "Weitere Optionen",
"contacts_searchOpen": "Suche öffnen", "contacts_searchOpen": "Suche öffnen",
"contacts_searchClose": "Suche schließen", "contacts_searchClose": "Suche schließen",
@@ -2925,7 +2928,7 @@
"repeater_pathHashModeOption2": "2 - 3 Bytes", "repeater_pathHashModeOption2": "2 - 3 Bytes",
"repeater_pathHashModeOption3": "3 - 4 Bytes", "repeater_pathHashModeOption3": "3 - 4 Bytes",
"appSettings_batteryLipoHv": "LiPo HV (3,0–4,35 V)", "appSettings_batteryLipoHv": "LiPo HV (3,0–4,35 V)",
"chat_sendImage": "Bild senden", "chat_sendImageLora": "Bild über MeshCore senden",
"chat_imagePickFailed": "Konnte dieses Bild nicht öffnen.", "chat_imagePickFailed": "Konnte dieses Bild nicht öffnen.",
"chat_receivedGif": "Erhalten eines GIF", "chat_receivedGif": "Erhalten eines GIF",
"repeater_keySettings": "Identitätsschlüssel ändern", "repeater_keySettings": "Identitätsschlüssel ändern",
+6 -1
View File
@@ -34,6 +34,8 @@
"messageStatus_pending": "Sending", "messageStatus_pending": "Sending",
"messageStatus_failed": "Failed to send", "messageStatus_failed": "Failed to send",
"messageStatus_repeated": "Heard repeated", "messageStatus_repeated": "Heard repeated",
"urlImage_enable": "Enable URL images",
"urlImage_possible": "Possible URL image; enable it in Settings.",
"common_reboot": "Reboot", "common_reboot": "Reboot",
"common_loading": "Loading...", "common_loading": "Loading...",
"common_notAvailable": "—", "common_notAvailable": "—",
@@ -246,6 +248,7 @@
"settings_infoStatus": "Status", "settings_infoStatus": "Status",
"settings_infoBattery": "Battery", "settings_infoBattery": "Battery",
"settings_infoPublicKey": "Public Key", "settings_infoPublicKey": "Public Key",
"settings_publicKeyCopied": "Public key copied",
"settings_infoContactsCount": "Contacts Count", "settings_infoContactsCount": "Contacts Count",
"settings_infoChannelCount": "Channel Count", "settings_infoChannelCount": "Channel Count",
"settings_infoHardware": "Hardware", "settings_infoHardware": "Hardware",
@@ -740,8 +743,9 @@
} }
} }
}, },
"chat_selectSendAction": "Select send action",
"chat_sendGif": "Send GIF", "chat_sendGif": "Send GIF",
"chat_sendImage": "Send image", "chat_sendImageLora": "Send image via meshcore",
"chat_imagePickFailed": "Couldn't open that image", "chat_imagePickFailed": "Couldn't open that image",
"@chat_imagePickFailed": { "@chat_imagePickFailed": {
"description": "Shown when picking or reading a photo to send fails" "description": "Shown when picking or reading a photo to send fails"
@@ -750,6 +754,7 @@
"chat_reply": "Reply", "chat_reply": "Reply",
"chat_addReaction": "Add Reaction", "chat_addReaction": "Add Reaction",
"chat_me": "Me", "chat_me": "Me",
"reaction_report": "Emoji Reactions",
"emojiCategorySmileys": "Smileys", "emojiCategorySmileys": "Smileys",
"emojiCategoryGestures": "Gestures", "emojiCategoryGestures": "Gestures",
"emojiCategoryHearts": "Hearts", "emojiCategoryHearts": "Hearts",
+2 -1
View File
@@ -507,6 +507,7 @@
} }
} }
}, },
"chat_selectSendAction": "Seleccionar acción de envío",
"chat_sendGif": "Enviar GIF", "chat_sendGif": "Enviar GIF",
"chat_reply": "Responder", "chat_reply": "Responder",
"chat_addReaction": "Añadir Reacción", "chat_addReaction": "Añadir Reacción",
@@ -2925,7 +2926,7 @@
"channels_regionNotSet": "Región: ninguna", "channels_regionNotSet": "Región: ninguna",
"channels_regionSelect_Title": "Seleccione una región", "channels_regionSelect_Title": "Seleccione una región",
"channels_clearRegion": "Zona despejada", "channels_clearRegion": "Zona despejada",
"chat_sendImage": "Enviar imagen", "chat_sendImageLora": "Enviar imagen mediante MeshCore",
"chat_imagePickFailed": "No pude abrir esa imagen", "chat_imagePickFailed": "No pude abrir esa imagen",
"chat_receivedGif": "Recibido un GIF", "chat_receivedGif": "Recibido un GIF",
"repeater_keySettings": "Cambiar Claves de Identidad", "repeater_keySettings": "Cambiar Claves de Identidad",
+2 -1
View File
@@ -507,6 +507,7 @@
} }
} }
}, },
"chat_selectSendAction": "Sélectionner une action d’envoi",
"chat_sendGif": "Envoyer un GIF", "chat_sendGif": "Envoyer un GIF",
"chat_reply": "Répondre", "chat_reply": "Répondre",
"chat_addReaction": "Ajouter une réaction", "chat_addReaction": "Ajouter une réaction",
@@ -2925,7 +2926,7 @@
"channels_regionNotSet": "Région : aucune", "channels_regionNotSet": "Région : aucune",
"channels_regionSelect_Title": "Choisissez une région", "channels_regionSelect_Title": "Choisissez une région",
"channels_clearRegion": "Zone dégagée", "channels_clearRegion": "Zone dégagée",
"chat_sendImage": "Envoyer l'image", "chat_sendImageLora": "Envoyer une image via MeshCore",
"chat_imagePickFailed": "Je n'ai pas pu ouvrir cette image", "chat_imagePickFailed": "Je n'ai pas pu ouvrir cette image",
"chat_receivedGif": "Reçu un GIF", "chat_receivedGif": "Reçu un GIF",
"repeater_keySettings": "Modifier les clés d'identité", "repeater_keySettings": "Modifier les clés d'identité",
+2 -1
View File
@@ -657,6 +657,7 @@
} }
} }
}, },
"chat_selectSendAction": "Küldési művelet kiválasztása",
"chat_sendGif": "GIF küldése", "chat_sendGif": "GIF küldése",
"chat_reply": "Válasz", "chat_reply": "Válasz",
"chat_addReaction": "Reakció hozzáadása", "chat_addReaction": "Reakció hozzáadása",
@@ -2829,7 +2830,7 @@
"channels_regionNotSet": "Tájékoztetés: nem", "channels_regionNotSet": "Tájékoztetés: nem",
"channels_regionSelect_Title": "Válassz egy regionot", "channels_regionSelect_Title": "Válassz egy regionot",
"channels_clearRegion": "Kéres kör", "channels_clearRegion": "Kéres kör",
"chat_sendImage": "Felhasználj az image", "chat_sendImageLora": "Kép küldése MeshCore-on keresztül",
"chat_imagePickFailed": "Nem tudtam ezt a fenti fényre kapni", "chat_imagePickFailed": "Nem tudtam ezt a fenti fényre kapni",
"chat_receivedGif": "GIF-ot kapott", "chat_receivedGif": "GIF-ot kapott",
"repeater_keySettings": "Képzőítsekei jelölt", "repeater_keySettings": "Képzőítsekei jelölt",
+3 -1
View File
@@ -140,6 +140,7 @@
"settings_infoStatus": "Stato", "settings_infoStatus": "Stato",
"settings_infoBattery": "Batteria", "settings_infoBattery": "Batteria",
"settings_infoPublicKey": "Chiave Pubblica", "settings_infoPublicKey": "Chiave Pubblica",
"settings_publicKeyCopied": "Chiave pubblica copiata",
"settings_infoContactsCount": "Numero di contatti", "settings_infoContactsCount": "Numero di contatti",
"settings_infoChannelCount": "Numero di canali", "settings_infoChannelCount": "Numero di canali",
"settings_presets": "Preset", "settings_presets": "Preset",
@@ -551,6 +552,7 @@
} }
} }
}, },
"chat_selectSendAction": "Seleziona azione di invio",
"chat_sendGif": "Invia GIF", "chat_sendGif": "Invia GIF",
"chat_reply": "Rispondi", "chat_reply": "Rispondi",
"chat_addReaction": "Aggiungi Reazione", "chat_addReaction": "Aggiungi Reazione",
@@ -2925,7 +2927,7 @@
"channels_regionNotSet": "Regione: nessuna", "channels_regionNotSet": "Regione: nessuna",
"channels_regionSelect_Title": "Scegli una regione", "channels_regionSelect_Title": "Scegli una regione",
"channels_clearRegion": "Zona chiara", "channels_clearRegion": "Zona chiara",
"chat_sendImage": "Invia immagine", "chat_sendImageLora": "Invia immagine tramite MeshCore",
"chat_imagePickFailed": "Non sono riuscito ad aprire quell'immagine", "chat_imagePickFailed": "Non sono riuscito ad aprire quell'immagine",
"chat_receivedGif": "Ricevuto un GIF", "chat_receivedGif": "Ricevuto un GIF",
"repeater_keySettings": "Cambia le Chiavi di Identità", "repeater_keySettings": "Cambia le Chiavi di Identità",
+2 -1
View File
@@ -675,6 +675,7 @@
} }
} }
}, },
"chat_selectSendAction": "送信アクションを選択",
"chat_sendGif": "GIF を送信", "chat_sendGif": "GIF を送信",
"chat_reply": "返信", "chat_reply": "返信",
"chat_addReaction": "リアクションを追加", "chat_addReaction": "リアクションを追加",
@@ -2925,7 +2926,7 @@
"channels_regionNotSet": "地域:なし", "channels_regionNotSet": "地域:なし",
"channels_regionSelect_Title": "地域を選択する", "channels_regionSelect_Title": "地域を選択する",
"channels_clearRegion": "クリアな地域", "channels_clearRegion": "クリアな地域",
"chat_sendImage": "画像を送信", "chat_sendImageLora": "MeshCore経由で画像を送信",
"chat_imagePickFailed": "その画像を開けませんでした", "chat_imagePickFailed": "その画像を開けませんでした",
"chat_receivedGif": "GIFを受け取りました", "chat_receivedGif": "GIFを受け取りました",
"repeater_keySettings": "アイデンティティキーの変更", "repeater_keySettings": "アイデンティティキーの変更",
+2 -1
View File
@@ -657,6 +657,7 @@
} }
} }
}, },
"chat_selectSendAction": "전송 작업 선택",
"chat_sendGif": "GIF 보내기", "chat_sendGif": "GIF 보내기",
"chat_reply": "답변", "chat_reply": "답변",
"chat_addReaction": "댓글 추가", "chat_addReaction": "댓글 추가",
@@ -2925,7 +2926,7 @@
"channels_regionNotSet": "지역: 없음", "channels_regionNotSet": "지역: 없음",
"channels_regionSelect_Title": "지역을 선택하세요", "channels_regionSelect_Title": "지역을 선택하세요",
"channels_clearRegion": "명확한 지역", "channels_clearRegion": "명확한 지역",
"chat_sendImage": "이미지를 보내세요", "chat_sendImageLora": "MeshCore를 통해 이미지 보내기",
"chat_imagePickFailed": "그 이미지를 열 수 없었어요.", "chat_imagePickFailed": "그 이미지를 열 수 없었어요.",
"chat_receivedGif": "GIF를 받았습니다", "chat_receivedGif": "GIF를 받았습니다",
"repeater_keySettings": "신원 키 변경", "repeater_keySettings": "신원 키 변경",
+33 -3
View File
@@ -334,6 +334,18 @@ abstract class AppLocalizations {
/// **'Heard repeated'** /// **'Heard repeated'**
String get messageStatus_repeated; String get messageStatus_repeated;
/// No description provided for @urlImage_enable.
///
/// In en, this message translates to:
/// **'Enable URL images'**
String get urlImage_enable;
/// No description provided for @urlImage_possible.
///
/// In en, this message translates to:
/// **'Possible URL image; enable it in Settings.'**
String get urlImage_possible;
/// No description provided for @common_reboot. /// No description provided for @common_reboot.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@@ -1228,6 +1240,12 @@ abstract class AppLocalizations {
/// **'Public Key'** /// **'Public Key'**
String get settings_infoPublicKey; String get settings_infoPublicKey;
/// No description provided for @settings_publicKeyCopied.
///
/// In en, this message translates to:
/// **'Public key copied'**
String get settings_publicKeyCopied;
/// No description provided for @settings_infoContactsCount. /// No description provided for @settings_infoContactsCount.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@@ -2728,17 +2746,23 @@ abstract class AppLocalizations {
/// **'Retry {current}/{max}'** /// **'Retry {current}/{max}'**
String chat_retryCount(int current, int max); String chat_retryCount(int current, int max);
/// No description provided for @chat_selectSendAction.
///
/// In en, this message translates to:
/// **'Select send action'**
String get chat_selectSendAction;
/// No description provided for @chat_sendGif. /// No description provided for @chat_sendGif.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Send GIF'** /// **'Send GIF'**
String get chat_sendGif; String get chat_sendGif;
/// No description provided for @chat_sendImage. /// No description provided for @chat_sendImageLora.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
/// **'Send image'** /// **'Send image via meshcore'**
String get chat_sendImage; String get chat_sendImageLora;
/// Shown when picking or reading a photo to send fails /// Shown when picking or reading a photo to send fails
/// ///
@@ -2770,6 +2794,12 @@ abstract class AppLocalizations {
/// **'Me'** /// **'Me'**
String get chat_me; String get chat_me;
/// No description provided for @reaction_report.
///
/// In en, this message translates to:
/// **'Emoji Reactions'**
String get reaction_report;
/// No description provided for @emojiCategorySmileys. /// No description provided for @emojiCategorySmileys.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsBg extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Повторно чуто'; String get messageStatus_repeated => 'Повторно чуто';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Рестартирай'; String get common_reboot => 'Рестартирай';
@@ -622,6 +628,9 @@ class AppLocalizationsBg extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Публичен ключ'; String get settings_infoPublicKey => 'Публичен ключ';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Брой контакти'; String get settings_infoContactsCount => 'Брой контакти';
@@ -1489,11 +1498,14 @@ class AppLocalizationsBg extends AppLocalizations {
return 'Опитай отново $current/$max'; return 'Опитай отново $current/$max';
} }
@override
String get chat_selectSendAction => 'Изберете действие за изпращане';
@override @override
String get chat_sendGif => 'Изпрати GIF'; String get chat_sendGif => 'Изпрати GIF';
@override @override
String get chat_sendImage => 'Изпрати изображение'; String get chat_sendImageLora => 'Изпращане на изображение чрез MeshCore';
@override @override
String get chat_imagePickFailed => 'Не мог да откривам та изображин'; String get chat_imagePickFailed => 'Не мог да откривам та изображин';
@@ -1510,6 +1522,9 @@ class AppLocalizationsBg extends AppLocalizations {
@override @override
String get chat_me => 'Аз'; String get chat_me => 'Аз';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Емотикони'; String get emojiCategorySmileys => 'Емотикони';
+17 -1
View File
@@ -110,6 +110,13 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Mehrfach gehört'; String get messageStatus_repeated => 'Mehrfach gehört';
@override
String get urlImage_enable => 'URL-Bilder anzeigen';
@override
String get urlImage_possible =>
'Mögliches URL-Bild; in den Einstellungen aktivieren.';
@override @override
String get common_reboot => 'Neustart'; String get common_reboot => 'Neustart';
@@ -618,6 +625,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Öffentlicher Schlüssel'; String get settings_infoPublicKey => 'Öffentlicher Schlüssel';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Kontakte'; String get settings_infoContactsCount => 'Kontakte';
@@ -1488,11 +1498,14 @@ class AppLocalizationsDe extends AppLocalizations {
return 'Wiederholen $current/$max'; return 'Wiederholen $current/$max';
} }
@override
String get chat_selectSendAction => 'Sendeaktion auswählen';
@override @override
String get chat_sendGif => 'GIF senden'; String get chat_sendGif => 'GIF senden';
@override @override
String get chat_sendImage => 'Bild senden'; String get chat_sendImageLora => 'Bild über MeshCore senden';
@override @override
String get chat_imagePickFailed => 'Konnte dieses Bild nicht öffnen.'; String get chat_imagePickFailed => 'Konnte dieses Bild nicht öffnen.';
@@ -1509,6 +1522,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get chat_me => 'Ich'; String get chat_me => 'Ich';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Emoticons'; String get emojiCategorySmileys => 'Emoticons';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Heard repeated'; String get messageStatus_repeated => 'Heard repeated';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Reboot'; String get common_reboot => 'Reboot';
@@ -605,6 +611,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Public Key'; String get settings_infoPublicKey => 'Public Key';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Contacts Count'; String get settings_infoContactsCount => 'Contacts Count';
@@ -1456,11 +1465,14 @@ class AppLocalizationsEn extends AppLocalizations {
return 'Retry $current/$max'; return 'Retry $current/$max';
} }
@override
String get chat_selectSendAction => 'Select send action';
@override @override
String get chat_sendGif => 'Send GIF'; String get chat_sendGif => 'Send GIF';
@override @override
String get chat_sendImage => 'Send image'; String get chat_sendImageLora => 'Send image via meshcore';
@override @override
String get chat_imagePickFailed => 'Couldn\'t open that image'; String get chat_imagePickFailed => 'Couldn\'t open that image';
@@ -1477,6 +1489,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get chat_me => 'Me'; String get chat_me => 'Me';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Smileys'; String get emojiCategorySmileys => 'Smileys';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsEs extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Escuchado repetidamente'; String get messageStatus_repeated => 'Escuchado repetidamente';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Reiniciar'; String get common_reboot => 'Reiniciar';
@@ -617,6 +623,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Clave pública'; String get settings_infoPublicKey => 'Clave pública';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Número de contactos'; String get settings_infoContactsCount => 'Número de contactos';
@@ -1484,11 +1493,14 @@ class AppLocalizationsEs extends AppLocalizations {
return 'Reintentar $current/$max'; return 'Reintentar $current/$max';
} }
@override
String get chat_selectSendAction => 'Seleccionar acción de envío';
@override @override
String get chat_sendGif => 'Enviar GIF'; String get chat_sendGif => 'Enviar GIF';
@override @override
String get chat_sendImage => 'Enviar imagen'; String get chat_sendImageLora => 'Enviar imagen mediante MeshCore';
@override @override
String get chat_imagePickFailed => 'No pude abrir esa imagen'; String get chat_imagePickFailed => 'No pude abrir esa imagen';
@@ -1505,6 +1517,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override @override
String get chat_me => 'Yo'; String get chat_me => 'Yo';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Emoticones'; String get emojiCategorySmileys => 'Emoticones';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsFr extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Reçu plusieurs fois'; String get messageStatus_repeated => 'Reçu plusieurs fois';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Redémarrer'; String get common_reboot => 'Redémarrer';
@@ -622,6 +628,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Clé publique'; String get settings_infoPublicKey => 'Clé publique';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Nombre de contacts'; String get settings_infoContactsCount => 'Nombre de contacts';
@@ -1487,11 +1496,14 @@ class AppLocalizationsFr extends AppLocalizations {
return 'Essai $current/$max'; return 'Essai $current/$max';
} }
@override
String get chat_selectSendAction => 'Sélectionner une action d’envoi';
@override @override
String get chat_sendGif => 'Envoyer un GIF'; String get chat_sendGif => 'Envoyer un GIF';
@override @override
String get chat_sendImage => 'Envoyer l\'image'; String get chat_sendImageLora => 'Envoyer une image via MeshCore';
@override @override
String get chat_imagePickFailed => 'Je n\'ai pas pu ouvrir cette image'; String get chat_imagePickFailed => 'Je n\'ai pas pu ouvrir cette image';
@@ -1508,6 +1520,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override @override
String get chat_me => 'Moi'; String get chat_me => 'Moi';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Émojis'; String get emojiCategorySmileys => 'Émojis';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsHu extends AppLocalizations {
@override @override
String get messageStatus_repeated => '– ismételte Heard'; String get messageStatus_repeated => '– ismételte Heard';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Indítsa újra'; String get common_reboot => 'Indítsa újra';
@@ -614,6 +620,9 @@ class AppLocalizationsHu extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Nyilvános kulcs'; String get settings_infoPublicKey => 'Nyilvános kulcs';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Névjegyek száma'; String get settings_infoContactsCount => 'Névjegyek száma';
@@ -1479,11 +1488,14 @@ class AppLocalizationsHu extends AppLocalizations {
return 'Próbálja újra $current/$max'; return 'Próbálja újra $current/$max';
} }
@override
String get chat_selectSendAction => 'Küldési művelet kiválasztása';
@override @override
String get chat_sendGif => 'GIF küldése'; String get chat_sendGif => 'GIF küldése';
@override @override
String get chat_sendImage => 'Felhasználj az image'; String get chat_sendImageLora => 'Kép küldése MeshCore-on keresztül';
@override @override
String get chat_imagePickFailed => 'Nem tudtam ezt a fenti fényre kapni'; String get chat_imagePickFailed => 'Nem tudtam ezt a fenti fényre kapni';
@@ -1500,6 +1512,9 @@ class AppLocalizationsHu extends AppLocalizations {
@override @override
String get chat_me => 'Nekem'; String get chat_me => 'Nekem';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Hangulatjelek'; String get emojiCategorySmileys => 'Hangulatjelek';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsIt extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Ricevuto ripetutamente'; String get messageStatus_repeated => 'Ricevuto ripetutamente';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Riavvia'; String get common_reboot => 'Riavvia';
@@ -621,6 +627,9 @@ class AppLocalizationsIt extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Chiave Pubblica'; String get settings_infoPublicKey => 'Chiave Pubblica';
@override
String get settings_publicKeyCopied => 'Chiave pubblica copiata';
@override @override
String get settings_infoContactsCount => 'Numero di contatti'; String get settings_infoContactsCount => 'Numero di contatti';
@@ -1487,11 +1496,14 @@ class AppLocalizationsIt extends AppLocalizations {
return 'Riprova $current/$max'; return 'Riprova $current/$max';
} }
@override
String get chat_selectSendAction => 'Seleziona azione di invio';
@override @override
String get chat_sendGif => 'Invia GIF'; String get chat_sendGif => 'Invia GIF';
@override @override
String get chat_sendImage => 'Invia immagine'; String get chat_sendImageLora => 'Invia immagine tramite MeshCore';
@override @override
String get chat_imagePickFailed => String get chat_imagePickFailed =>
@@ -1509,6 +1521,9 @@ class AppLocalizationsIt extends AppLocalizations {
@override @override
String get chat_me => 'Io'; String get chat_me => 'Io';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Emoji'; String get emojiCategorySmileys => 'Emoji';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsJa extends AppLocalizations {
@override @override
String get messageStatus_repeated => '何度も聞いた'; String get messageStatus_repeated => '何度も聞いた';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => '再起動'; String get common_reboot => '再起動';
@@ -587,6 +593,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override @override
String get settings_infoPublicKey => '公開鍵'; String get settings_infoPublicKey => '公開鍵';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => '連絡先数'; String get settings_infoContactsCount => '連絡先数';
@@ -1412,11 +1421,14 @@ class AppLocalizationsJa extends AppLocalizations {
return '$current/$max 回目'; return '$current/$max 回目';
} }
@override
String get chat_selectSendAction => '送信アクションを選択';
@override @override
String get chat_sendGif => 'GIF を送信'; String get chat_sendGif => 'GIF を送信';
@override @override
String get chat_sendImage => '画像を送信'; String get chat_sendImageLora => 'MeshCore経由で画像を送信';
@override @override
String get chat_imagePickFailed => 'その画像を開けませんでした'; String get chat_imagePickFailed => 'その画像を開けませんでした';
@@ -1433,6 +1445,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override @override
String get chat_me => '私'; String get chat_me => '私';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => '顔文字'; String get emojiCategorySmileys => '顔文字';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsKo extends AppLocalizations {
@override @override
String get messageStatus_repeated => '반복 수신됨'; String get messageStatus_repeated => '반복 수신됨';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => '재부팅'; String get common_reboot => '재부팅';
@@ -588,6 +594,9 @@ class AppLocalizationsKo extends AppLocalizations {
@override @override
String get settings_infoPublicKey => '공개 키'; String get settings_infoPublicKey => '공개 키';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => '연락처 수'; String get settings_infoContactsCount => '연락처 수';
@@ -1415,11 +1424,14 @@ class AppLocalizationsKo extends AppLocalizations {
return '$current/$max 시도'; return '$current/$max 시도';
} }
@override
String get chat_selectSendAction => '전송 작업 선택';
@override @override
String get chat_sendGif => 'GIF 보내기'; String get chat_sendGif => 'GIF 보내기';
@override @override
String get chat_sendImage => '이미지를 보내세요'; String get chat_sendImageLora => 'MeshCore를 통해 이미지 보내기';
@override @override
String get chat_imagePickFailed => '그 이미지를 열 수 없었어요.'; String get chat_imagePickFailed => '그 이미지를 열 수 없었어요.';
@@ -1436,6 +1448,9 @@ class AppLocalizationsKo extends AppLocalizations {
@override @override
String get chat_me => '나'; String get chat_me => '나';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => '이모티콘'; String get emojiCategorySmileys => '이모티콘';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsNl extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Hearsay, herhaald'; String get messageStatus_repeated => 'Hearsay, herhaald';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Herstarten'; String get common_reboot => 'Herstarten';
@@ -614,6 +620,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Openbare Sleutel'; String get settings_infoPublicKey => 'Openbare Sleutel';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Aantal Contacten'; String get settings_infoContactsCount => 'Aantal Contacten';
@@ -1474,11 +1483,14 @@ class AppLocalizationsNl extends AppLocalizations {
return 'Poging opnieuw $current/$max'; return 'Poging opnieuw $current/$max';
} }
@override
String get chat_selectSendAction => 'Verzendactie selecteren';
@override @override
String get chat_sendGif => 'GIF verzenden'; String get chat_sendGif => 'GIF verzenden';
@override @override
String get chat_sendImage => 'Beeld verzenden'; String get chat_sendImageLora => 'Afbeelding verzenden via MeshCore';
@override @override
String get chat_imagePickFailed => 'Kunde die afbeelding niet openen'; String get chat_imagePickFailed => 'Kunde die afbeelding niet openen';
@@ -1495,6 +1507,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override @override
String get chat_me => 'Mijn'; String get chat_me => 'Mijn';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Emoji\'s'; String get emojiCategorySmileys => 'Emoji\'s';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsPl extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Usłyszałem to wielokrotnie'; String get messageStatus_repeated => 'Usłyszałem to wielokrotnie';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Uruchom ponownie'; String get common_reboot => 'Uruchom ponownie';
@@ -622,6 +628,9 @@ class AppLocalizationsPl extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Klucz Publiczny'; String get settings_infoPublicKey => 'Klucz Publiczny';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Liczba kontaktów'; String get settings_infoContactsCount => 'Liczba kontaktów';
@@ -1497,11 +1506,14 @@ class AppLocalizationsPl extends AppLocalizations {
return 'Próba $current/$max'; return 'Próba $current/$max';
} }
@override
String get chat_selectSendAction => 'Wybierz czynność wysyłania';
@override @override
String get chat_sendGif => 'Wyślij GIF'; String get chat_sendGif => 'Wyślij GIF';
@override @override
String get chat_sendImage => 'Wyślij obraz'; String get chat_sendImageLora => 'Wyślij obraz przez MeshCore';
@override @override
String get chat_imagePickFailed => 'Nie mogłem otworzyć tego obrazu'; String get chat_imagePickFailed => 'Nie mogłem otworzyć tego obrazu';
@@ -1518,6 +1530,9 @@ class AppLocalizationsPl extends AppLocalizations {
@override @override
String get chat_me => 'Ja'; String get chat_me => 'Ja';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Emoji'; String get emojiCategorySmileys => 'Emoji';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsPt extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Ouvi repetidamente'; String get messageStatus_repeated => 'Ouvi repetidamente';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Reiniciar'; String get common_reboot => 'Reiniciar';
@@ -619,6 +625,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Chave Pública'; String get settings_infoPublicKey => 'Chave Pública';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Número de Contatos'; String get settings_infoContactsCount => 'Número de Contatos';
@@ -1483,11 +1492,14 @@ class AppLocalizationsPt extends AppLocalizations {
return 'Tentar $current/$max'; return 'Tentar $current/$max';
} }
@override
String get chat_selectSendAction => 'Selecionar ação de envio';
@override @override
String get chat_sendGif => 'Enviar GIF'; String get chat_sendGif => 'Enviar GIF';
@override @override
String get chat_sendImage => 'Enviar imagem'; String get chat_sendImageLora => 'Enviar imagem via MeshCore';
@override @override
String get chat_imagePickFailed => 'Não consegui abrir essa imagem'; String get chat_imagePickFailed => 'Não consegui abrir essa imagem';
@@ -1504,6 +1516,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override @override
String get chat_me => 'Eu'; String get chat_me => 'Eu';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Emojis'; String get emojiCategorySmileys => 'Emojis';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsRu extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Услышал несколько раз'; String get messageStatus_repeated => 'Услышал несколько раз';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Перезагрузить'; String get common_reboot => 'Перезагрузить';
@@ -620,6 +626,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Публичный ключ'; String get settings_infoPublicKey => 'Публичный ключ';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Количество контактов'; String get settings_infoContactsCount => 'Количество контактов';
@@ -1487,11 +1496,14 @@ class AppLocalizationsRu extends AppLocalizations {
return 'Попытка $current/$max'; return 'Попытка $current/$max';
} }
@override
String get chat_selectSendAction => 'Выберите действие отправки';
@override @override
String get chat_sendGif => 'Отправить GIF'; String get chat_sendGif => 'Отправить GIF';
@override @override
String get chat_sendImage => 'Отправьте изображение'; String get chat_sendImageLora => 'Отправить изображение через MeshCore';
@override @override
String get chat_imagePickFailed => 'Не удалось открыть это изображение'; String get chat_imagePickFailed => 'Не удалось открыть это изображение';
@@ -1508,6 +1520,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override @override
String get chat_me => 'Я'; String get chat_me => 'Я';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Смайлы'; String get emojiCategorySmileys => 'Смайлы';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsSk extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Slyšal som to opakovane'; String get messageStatus_repeated => 'Slyšal som to opakovane';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Restartovať'; String get common_reboot => 'Restartovať';
@@ -612,6 +618,9 @@ class AppLocalizationsSk extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Verejný kľúč'; String get settings_infoPublicKey => 'Verejný kľúč';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Počet kontaktov'; String get settings_infoContactsCount => 'Počet kontaktov';
@@ -1472,11 +1481,14 @@ class AppLocalizationsSk extends AppLocalizations {
return 'Skúsiť $current/$max'; return 'Skúsiť $current/$max';
} }
@override
String get chat_selectSendAction => 'Vybrať akciu odoslania';
@override @override
String get chat_sendGif => 'Odoslať GIF'; String get chat_sendGif => 'Odoslať GIF';
@override @override
String get chat_sendImage => 'Vyslat obraz'; String get chat_sendImageLora => 'Odoslať obrázok cez MeshCore';
@override @override
String get chat_imagePickFailed => 'Nesmiela jsem otvoriť tento obrázok'; String get chat_imagePickFailed => 'Nesmiela jsem otvoriť tento obrázok';
@@ -1493,6 +1505,9 @@ class AppLocalizationsSk extends AppLocalizations {
@override @override
String get chat_me => 'Mne'; String get chat_me => 'Mne';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Emoji'; String get emojiCategorySmileys => 'Emoji';
+16 -1
View File
@@ -111,6 +111,12 @@ class AppLocalizationsSl extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Slišal sem večkrat'; String get messageStatus_repeated => 'Slišal sem večkrat';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Ponoviti'; String get common_reboot => 'Ponoviti';
@@ -611,6 +617,9 @@ class AppLocalizationsSl extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Javni ključ'; String get settings_infoPublicKey => 'Javni ključ';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Število stikov'; String get settings_infoContactsCount => 'Število stikov';
@@ -1472,11 +1481,14 @@ class AppLocalizationsSl extends AppLocalizations {
return 'Ponovit $current/$max'; return 'Ponovit $current/$max';
} }
@override
String get chat_selectSendAction => 'Izberite dejanje pošiljanja';
@override @override
String get chat_sendGif => 'Pošlji GIF'; String get chat_sendGif => 'Pošlji GIF';
@override @override
String get chat_sendImage => 'Sločaji slik'; String get chat_sendImageLora => 'Pošlji sliko prek MeshCore';
@override @override
String get chat_imagePickFailed => 'Nispeval sem tega ta slik'; String get chat_imagePickFailed => 'Nispeval sem tega ta slik';
@@ -1493,6 +1505,9 @@ class AppLocalizationsSl extends AppLocalizations {
@override @override
String get chat_me => 'jaz'; String get chat_me => 'jaz';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Emoji'; String get emojiCategorySmileys => 'Emoji';
File diff suppressed because it is too large. Load diff
+16 -2
View File
@@ -110,6 +110,12 @@ class AppLocalizationsUk extends AppLocalizations {
@override @override
String get messageStatus_repeated => 'Почув неодноразово'; String get messageStatus_repeated => 'Почув неодноразово';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => 'Перезавантажити'; String get common_reboot => 'Перезавантажити';
@@ -615,6 +621,9 @@ class AppLocalizationsUk extends AppLocalizations {
@override @override
String get settings_infoPublicKey => 'Відкритий ключ'; String get settings_infoPublicKey => 'Відкритий ключ';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => 'Кількість контактів'; String get settings_infoContactsCount => 'Кількість контактів';
@@ -1477,12 +1486,14 @@ class AppLocalizationsUk extends AppLocalizations {
return 'Повторна спроба $current/$max'; return 'Повторна спроба $current/$max';
} }
@override
String get chat_selectSendAction => 'Виберіть дію надсилання';
@override @override
String get chat_sendGif => 'Надіслати GIF'; String get chat_sendGif => 'Надіслати GIF';
@override @override
String get chat_sendImage => String get chat_sendImageLora => 'Надіслати зображення через MeshCore';
'Нашкоду зовні\n\n(or more naturally, depending on context)\n\nПошукуєте изображення';
@override @override
String get chat_imagePickFailed => 'Неможливо відкрити це изображення'; String get chat_imagePickFailed => 'Неможливо відкрити це изображення';
@@ -1499,6 +1510,9 @@ class AppLocalizationsUk extends AppLocalizations {
@override @override
String get chat_me => 'Я'; String get chat_me => 'Я';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => 'Емодзі'; String get emojiCategorySmileys => 'Емодзі';
+16 -1
View File
@@ -110,6 +110,12 @@ class AppLocalizationsZh extends AppLocalizations {
@override @override
String get messageStatus_repeated => '多次听到'; String get messageStatus_repeated => '多次听到';
@override
String get urlImage_enable => 'Enable URL images';
@override
String get urlImage_possible => 'Possible URL image; enable it in Settings.';
@override @override
String get common_reboot => '重启'; String get common_reboot => '重启';
@@ -580,6 +586,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override @override
String get settings_infoPublicKey => '公钥'; String get settings_infoPublicKey => '公钥';
@override
String get settings_publicKeyCopied => 'Public key copied';
@override @override
String get settings_infoContactsCount => '联系人数量'; String get settings_infoContactsCount => '联系人数量';
@@ -1398,11 +1407,14 @@ class AppLocalizationsZh extends AppLocalizations {
return '重试 $current/$max'; return '重试 $current/$max';
} }
@override
String get chat_selectSendAction => '选择发送操作';
@override @override
String get chat_sendGif => '发送 GIF'; String get chat_sendGif => '发送 GIF';
@override @override
String get chat_sendImage => '发送图片'; String get chat_sendImageLora => '通过 MeshCore 发送图片';
@override @override
String get chat_imagePickFailed => '无法打开该图片'; String get chat_imagePickFailed => '无法打开该图片';
@@ -1419,6 +1431,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override @override
String get chat_me => '我'; String get chat_me => '我';
@override
String get reaction_report => 'Emoji Reactions';
@override @override
String get emojiCategorySmileys => '表情'; String get emojiCategorySmileys => '表情';
+2 -1
View File
@@ -485,6 +485,7 @@
} }
} }
}, },
"chat_selectSendAction": "Verzendactie selecteren",
"chat_sendGif": "GIF verzenden", "chat_sendGif": "GIF verzenden",
"chat_reply": "Reageren", "chat_reply": "Reageren",
"chat_addReaction": "Reactie toevoegen", "chat_addReaction": "Reactie toevoegen",
@@ -2791,7 +2792,7 @@
"channels_regionNotSet": "Regio: geen", "channels_regionNotSet": "Regio: geen",
"channels_regionSelect_Title": "Kies een regio", "channels_regionSelect_Title": "Kies een regio",
"channels_clearRegion": "Duidelijke regio", "channels_clearRegion": "Duidelijke regio",
"chat_sendImage": "Beeld verzenden", "chat_sendImageLora": "Afbeelding verzenden via MeshCore",
"chat_imagePickFailed": "Kunde die afbeelding niet openen", "chat_imagePickFailed": "Kunde die afbeelding niet openen",
"chat_receivedGif": "Ontvangen van een GIF", "chat_receivedGif": "Ontvangen van een GIF",
"repeater_keySettings": "Verander de Identiteitskies", "repeater_keySettings": "Verander de Identiteitskies",
+2 -1
View File
@@ -495,6 +495,7 @@
} }
} }
}, },
"chat_selectSendAction": "Wybierz czynność wysyłania",
"chat_sendGif": "Wyślij GIF", "chat_sendGif": "Wyślij GIF",
"chat_reply": "Odpowiedz", "chat_reply": "Odpowiedz",
"chat_addReaction": "Dodaj Reakcję", "chat_addReaction": "Dodaj Reakcję",
@@ -2823,7 +2824,7 @@
"channels_regionNotSet": "Region: brak", "channels_regionNotSet": "Region: brak",
"channels_regionSelect_Title": "Wybierz region", "channels_regionSelect_Title": "Wybierz region",
"channels_clearRegion": "Przejrzyste obszar", "channels_clearRegion": "Przejrzyste obszar",
"chat_sendImage": "Wyślij obraz", "chat_sendImageLora": "Wyślij obraz przez MeshCore",
"chat_imagePickFailed": "Nie mogłem otworzyć tego obrazu", "chat_imagePickFailed": "Nie mogłem otworzyć tego obrazu",
"chat_receivedGif": "Otrzymano GIF", "chat_receivedGif": "Otrzymano GIF",
"repeater_keySettings": "Zmiana kluczy tożsamości", "repeater_keySettings": "Zmiana kluczy tożsamości",
+2 -1
View File
@@ -485,6 +485,7 @@
} }
} }
}, },
"chat_selectSendAction": "Selecionar ação de envio",
"chat_sendGif": "Enviar GIF", "chat_sendGif": "Enviar GIF",
"chat_reply": "Responder", "chat_reply": "Responder",
"chat_addReaction": "Adicionar Reação", "chat_addReaction": "Adicionar Reação",
@@ -2791,7 +2792,7 @@
"channels_regionNotSet": "Região: nenhuma", "channels_regionNotSet": "Região: nenhuma",
"channels_regionSelect_Title": "Escolha uma região", "channels_regionSelect_Title": "Escolha uma região",
"channels_clearRegion": "Região desimpedida", "channels_clearRegion": "Região desimpedida",
"chat_sendImage": "Enviar imagem", "chat_sendImageLora": "Enviar imagem via MeshCore",
"chat_imagePickFailed": "Não consegui abrir essa imagem", "chat_imagePickFailed": "Não consegui abrir essa imagem",
"chat_receivedGif": "Recebi um GIF", "chat_receivedGif": "Recebi um GIF",
"repeater_keySettings": "Alterar Chaves de Identidade", "repeater_keySettings": "Alterar Chaves de Identidade",
+2 -1
View File
@@ -316,6 +316,7 @@
"chat_messageDeleted": "Сообщение удалено", "chat_messageDeleted": "Сообщение удалено",
"chat_retryingMessage": "Повтор отправки сообщения", "chat_retryingMessage": "Повтор отправки сообщения",
"chat_retryCount": "Попытка {current}/{max}", "chat_retryCount": "Попытка {current}/{max}",
"chat_selectSendAction": "Выберите действие отправки",
"chat_sendGif": "Отправить GIF", "chat_sendGif": "Отправить GIF",
"chat_reply": "Ответить", "chat_reply": "Ответить",
"chat_addReaction": "Добавить реакцию", "chat_addReaction": "Добавить реакцию",
@@ -2088,7 +2089,7 @@
"channels_regionNotSet": "Регион: отсутствует", "channels_regionNotSet": "Регион: отсутствует",
"channels_regionSelect_Title": "Выберите регион", "channels_regionSelect_Title": "Выберите регион",
"channels_clearRegion": "Чистый регион", "channels_clearRegion": "Чистый регион",
"chat_sendImage": "Отправьте изображение", "chat_sendImageLora": "Отправить изображение через MeshCore",
"chat_imagePickFailed": "Не удалось открыть это изображение", "chat_imagePickFailed": "Не удалось открыть это изображение",
"chat_receivedGif": "Получен GIF", "chat_receivedGif": "Получен GIF",
"repeater_keySettings": "Изменить ключи идентичности", "repeater_keySettings": "Изменить ключи идентичности",
+2 -1
View File
@@ -485,6 +485,7 @@
} }
} }
}, },
"chat_selectSendAction": "Vybrať akciu odoslania",
"chat_sendGif": "Odoslať GIF", "chat_sendGif": "Odoslať GIF",
"chat_reply": "Odpovedať", "chat_reply": "Odpovedať",
"chat_addReaction": "Pridať Reakciu", "chat_addReaction": "Pridať Reakciu",
@@ -2791,7 +2792,7 @@
"channels_regionNotSet": "Region: žiadné", "channels_regionNotSet": "Region: žiadné",
"channels_regionSelect_Title": "Vyberte region", "channels_regionSelect_Title": "Vyberte region",
"channels_clearRegion": "Jasný údajný oblasť", "channels_clearRegion": "Jasný údajný oblasť",
"chat_sendImage": "Vyslat obraz", "chat_sendImageLora": "Odoslať obrázok cez MeshCore",
"chat_imagePickFailed": "Nesmiela jsem otvoriť tento obrázok", "chat_imagePickFailed": "Nesmiela jsem otvoriť tento obrázok",
"chat_receivedGif": "Odeslaný GIF", "chat_receivedGif": "Odeslaný GIF",
"repeater_keySettings": "Zmena identititačných klíčov", "repeater_keySettings": "Zmena identititačných klíčov",
+2 -1
View File
@@ -485,6 +485,7 @@
} }
} }
}, },
"chat_selectSendAction": "Izberite dejanje pošiljanja",
"chat_sendGif": "Pošlji GIF", "chat_sendGif": "Pošlji GIF",
"chat_reply": "Odgovori", "chat_reply": "Odgovori",
"chat_addReaction": "Dodaj reakcijo", "chat_addReaction": "Dodaj reakcijo",
@@ -2791,7 +2792,7 @@
"channels_regionNotSet": "Region: brak", "channels_regionNotSet": "Region: brak",
"channels_regionSelect_Title": "Vablajte region", "channels_regionSelect_Title": "Vablajte region",
"channels_clearRegion": "Jasna regija", "channels_clearRegion": "Jasna regija",
"chat_sendImage": "Sločaji slik", "chat_sendImageLora": "Pošlji sliko prek MeshCore",
"chat_imagePickFailed": "Nispeval sem tega ta slik", "chat_imagePickFailed": "Nispeval sem tega ta slik",
"chat_receivedGif": "Otrvljen GIF", "chat_receivedGif": "Otrvljen GIF",
"repeater_keySettings": "Zmeničke ključe identitete", "repeater_keySettings": "Zmeničke ključe identitete",
+436 -434
View File
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -488,6 +488,7 @@
} }
} }
}, },
"chat_selectSendAction": "Виберіть дію надсилання",
"chat_sendGif": "Надіслати GIF", "chat_sendGif": "Надіслати GIF",
"chat_reply": "Відповісти", "chat_reply": "Відповісти",
"chat_addReaction": "Додати реакцію", "chat_addReaction": "Додати реакцію",
@@ -2771,7 +2772,7 @@
"channels_regionNotSet": "Ріон: нема", "channels_regionNotSet": "Ріон: нема",
"channels_regionSelect_Title": "Вybірте регіон", "channels_regionSelect_Title": "Вybірте регіон",
"channels_clearRegion": "Чистя зона", "channels_clearRegion": "Чистя зона",
"chat_sendImage": "Нашкоду зовні\n\n(or more naturally, depending on context)\n\nПошукуєте изображення", "chat_sendImageLora": "Надіслати зображення через MeshCore",
"chat_imagePickFailed": "Неможливо відкрити це изображення", "chat_imagePickFailed": "Неможливо відкрити це изображення",
"chat_receivedGif": "Підймовано GIF", "chat_receivedGif": "Підймовано GIF",
"repeater_keySettings": "Зміна ключів ідентифікації", "repeater_keySettings": "Зміна ключів ідентифікації",
+2 -1
View File
@@ -512,6 +512,7 @@
} }
} }
}, },
"chat_selectSendAction": "选择发送操作",
"chat_sendGif": "发送 GIF", "chat_sendGif": "发送 GIF",
"chat_reply": "回复", "chat_reply": "回复",
"chat_addReaction": "添加表情", "chat_addReaction": "添加表情",
@@ -2796,7 +2797,7 @@
"channels_regionNotSet": "地区:无", "channels_regionNotSet": "地区:无",
"channels_regionSelect_Title": "选择一个地区", "channels_regionSelect_Title": "选择一个地区",
"channels_clearRegion": "无碍区域", "channels_clearRegion": "无碍区域",
"chat_sendImage": "发送图片", "chat_sendImageLora": "通过 MeshCore 发送图片",
"chat_imagePickFailed": "无法打开该图片", "chat_imagePickFailed": "无法打开该图片",
"chat_receivedGif": "收到一个GIF", "chat_receivedGif": "收到一个GIF",
"repeater_keySettings": "更改身份密钥", "repeater_keySettings": "更改身份密钥",
+34 -5
View File
@@ -50,7 +50,7 @@ class ChannelMessage {
final String? replyToMessageId; final String? replyToMessageId;
final String? replyToSenderName; final String? replyToSenderName;
final String? replyToText; final String? replyToText;
final Map<String, int> reactions; final Map<String, List<String?>> reactions;
ChannelMessage({ ChannelMessage({
this.senderKey, this.senderKey,
@@ -76,7 +76,7 @@ class ChannelMessage {
this.replyToMessageId, this.replyToMessageId,
this.replyToSenderName, this.replyToSenderName,
this.replyToText, this.replyToText,
Map<String, int>? reactions, Map<String, List<String?>>? reactions,
}) : messageId = }) : messageId =
messageId ?? messageId ??
'${timestamp.millisecondsSinceEpoch}_${senderName.hashCode}_${text.hashCode}', '${timestamp.millisecondsSinceEpoch}_${senderName.hashCode}_${text.hashCode}',
@@ -107,7 +107,7 @@ class ChannelMessage {
Object? translatedLanguageCode = _unset, Object? translatedLanguageCode = _unset,
MessageTranslationStatus? translationStatus, MessageTranslationStatus? translationStatus,
Object? translationModelId = _unset, Object? translationModelId = _unset,
Map<String, int>? reactions, Map<String, List<String?>>? reactions,
}) { }) {
return ChannelMessage( return ChannelMessage(
senderKey: senderKey, senderKey: senderKey,
@@ -297,8 +297,37 @@ class ChannelMessage {
); );
} }
static ReactionInfo? parseReaction(String text) { ReactionInfo? parseReaction() {
return ReactionHelper.parseReaction(text); final reactionInfo = ReactionHelper.parseReaction(text);
reactionInfo?.senderName = senderName;
return reactionInfo;
}
String computeReactionHash() {
return ReactionHelper.computeReactionHash(
timestamp.millisecondsSinceEpoch ~/ 1000,
senderName,
text,
);
}
List<ReactionInfo> reactionList() {
final String hash = computeReactionHash();
List<ReactionInfo> reactionList = [];
for (final entry in reactions.entries) {
final emoji = entry.key;
for (final senderName in entry.value) {
reactionList.add(
ReactionInfo(
targetHash: hash, // won't be used for anything
emoji: emoji,
senderName: senderName,
hashType: HashType.ours, // also not used for anything
),
);
}
}
return reactionList;
} }
} }
+4 -4
View File
@@ -8,7 +8,7 @@ enum MessageStatus { pending, sent, delivered, failed }
class Message { class Message {
static const Object _unset = Object(); static const Object _unset = Object();
final Uint8List senderKey; final Uint8List senderKey; // For outgoing msgs, gets used as recipientKey
final String text; final String text;
final DateTime timestamp; final DateTime timestamp;
final bool isOutgoing; final bool isOutgoing;
@@ -30,7 +30,7 @@ class Message {
final int? tripTimeMs; final int? tripTimeMs;
final int? pathLength; final int? pathLength;
final Uint8List pathBytes; final Uint8List pathBytes;
final Map<String, int> reactions; final Map<String, List<String?>> reactions;
final Map<String, MessageStatus> reactionStatuses; final Map<String, MessageStatus> reactionStatuses;
final Uint8List fourByteRoomContactKey; final Uint8List fourByteRoomContactKey;
@@ -56,7 +56,7 @@ class Message {
this.pathLength, this.pathLength,
Uint8List? pathBytes, Uint8List? pathBytes,
Uint8List? fourByteRoomContactKey, Uint8List? fourByteRoomContactKey,
Map<String, int>? reactions, Map<String, List<String?>>? reactions,
Map<String, MessageStatus>? reactionStatuses, Map<String, MessageStatus>? reactionStatuses,
}) : messageId = }) : messageId =
messageId ?? messageId ??
@@ -84,7 +84,7 @@ class Message {
Object? translatedLanguageCode = _unset, Object? translatedLanguageCode = _unset,
MessageTranslationStatus? translationStatus, MessageTranslationStatus? translationStatus,
Object? translationModelId = _unset, Object? translationModelId = _unset,
Map<String, int>? reactions, Map<String, List<String?>>? reactions,
Map<String, MessageStatus>? reactionStatuses, Map<String, MessageStatus>? reactionStatuses,
Uint8List? fourByteRoomContactKey, Uint8List? fourByteRoomContactKey,
}) { }) {
+12 -2
View File
@@ -478,7 +478,17 @@ class RadioSettings {
bandwidth: LoRaBandwidth.bw62_5, bandwidth: LoRaBandwidth.bw62_5,
spreadingFactor: LoRaSpreadingFactor.sf9, spreadingFactor: LoRaSpreadingFactor.sf9,
codingRate: LoRaCodingRate.cr4_8, codingRate: LoRaCodingRate.cr4_8,
txPowerDbm: 20, txPowerDbm: 22,
),
),
(
'USA Philly',
RadioSettings(
frequencyMHz: 902.250,
bandwidth: LoRaBandwidth.bw500,
spreadingFactor: LoRaSpreadingFactor.sf11,
codingRate: LoRaCodingRate.cr4_5,
txPowerDbm: 22,
), ),
), ),
( (
@@ -488,7 +498,7 @@ class RadioSettings {
bandwidth: LoRaBandwidth.bw62_5, bandwidth: LoRaBandwidth.bw62_5,
spreadingFactor: LoRaSpreadingFactor.sf7, spreadingFactor: LoRaSpreadingFactor.sf7,
codingRate: LoRaCodingRate.cr4_5, codingRate: LoRaCodingRate.cr4_5,
txPowerDbm: 20, txPowerDbm: 22,
), ),
), ),
( (
+266 -93
View File
@@ -18,6 +18,7 @@ import '../helpers/chat_scroll_controller.dart';
import '../connector/meshcore_protocol.dart'; import '../connector/meshcore_protocol.dart';
import '../helpers/cyr2lat.dart'; import '../helpers/cyr2lat.dart';
import '../helpers/gif_helper.dart'; import '../helpers/gif_helper.dart';
import '../helpers/message_url_image_helper.dart';
import '../helpers/path_helper.dart'; import '../helpers/path_helper.dart';
import '../helpers/reaction_helper.dart'; import '../helpers/reaction_helper.dart';
import '../helpers/snack_bar_builder.dart'; import '../helpers/snack_bar_builder.dart';
@@ -41,7 +42,6 @@ import '../widgets/emoji_picker.dart';
import '../widgets/gif_message.dart'; import '../widgets/gif_message.dart';
import '../widgets/jump_to_bottom_button.dart'; import '../widgets/jump_to_bottom_button.dart';
import '../widgets/gif_picker.dart'; import '../widgets/gif_picker.dart';
import '../widgets/image_send_button.dart';
import '../widgets/image_send_codec_binding.dart'; import '../widgets/image_send_codec_binding.dart';
import '../widgets/image_send_preview_sheet.dart'; import '../widgets/image_send_preview_sheet.dart';
import '../widgets/message_translation_button.dart'; import '../widgets/message_translation_button.dart';
@@ -413,6 +413,9 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
); );
} }
final urlImagesEnabled = connector.isChannelUrlImagesEnabled(
widget.channel.index,
);
// Images are not ChannelMessages: they arrive as GRP_DATA // Images are not ChannelMessages: they arrive as GRP_DATA
// chunks and are owned by ReceivedImageStore, so the two // chunks and are owned by ReceivedImageStore, so the two
// sources are merged here in timestamp order and the list // sources are merged here in timestamp order and the list
@@ -501,7 +504,11 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
); );
final message = row.message; final message = row.message;
final bubble = message != null final bubble = message != null
? _buildMessageBubble(message, textScale) ? _buildMessageBubble(
message,
textScale,
urlImagesEnabled,
)
: _buildImageBubble( : _buildImageBubble(
row.image!, row.image!,
textScale, textScale,
@@ -525,7 +532,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
}, },
), ),
), ),
_buildMessageComposer(), _buildInputBar(),
], ],
), ),
), ),
@@ -544,7 +551,11 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
connector.setChannelUnreadCount(widget.channel.index, count); connector.setChannelUnreadCount(widget.channel.index, count);
} }
Widget _buildMessageBubble(ChannelMessage message, double textScale) { Widget _buildMessageBubble(
ChannelMessage message,
double textScale,
bool urlImagesEnabled,
) {
final settingsService = context.watch<AppSettingsService>(); final settingsService = context.watch<AppSettingsService>();
final enableTracing = settingsService.settings.enableMessageTracing; final enableTracing = settingsService.settings.enableMessageTracing;
final isOutgoing = message.isOutgoing; final isOutgoing = message.isOutgoing;
@@ -584,6 +595,33 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
final metaColor = textColor.withValues(alpha: 0.65); final metaColor = textColor.withValues(alpha: 0.65);
const bodyFontSize = 14.0; const bodyFontSize = 14.0;
Widget buildTextContent() {
return Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Flexible(
child: TranslatedMessageContent(
displayText: translatedDisplayText,
originalText: originalDisplayText,
style: TextStyle(
color: textColor,
fontSize: bodyFontSize * textScale,
),
originalStyle: TextStyle(
fontSize: bodyFontSize * textScale,
fontStyle: FontStyle.italic,
color: textColor.withValues(alpha: 0.72),
),
onSecondaryTap: PlatformInfo.isDesktop
? () => _showMessageActions(message)
: null,
),
),
],
);
}
// Asymmetric radius matching chat_screen bubbles. // Asymmetric radius matching chat_screen bubbles.
final borderRadius = isOutgoing final borderRadius = isOutgoing
? const BorderRadius.only( ? const BorderRadius.only(
@@ -689,29 +727,76 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
), ),
], ],
) )
else if (urlImagesEnabled)
MessageUrlImageFutureBuilder(
messageId: message.messageId,
text: message.text,
builder: (context, snapshot) {
final imageAttachment = snapshot.data;
if (imageAttachment != null) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 4,
),
child: Align(
alignment: isOutgoing
? Alignment.centerRight
: Alignment.centerLeft,
child: MessageUrlImagePreview(
imageUrl: imageAttachment,
),
),
),
Padding(
padding: const EdgeInsets.only(top: 8),
child: TranslatedMessageContent(
displayText: translatedDisplayText,
originalText: originalDisplayText,
style: TextStyle(
color: textColor,
fontSize: bodyFontSize * textScale,
),
originalStyle: TextStyle(
fontSize: bodyFontSize * textScale,
fontStyle: FontStyle.italic,
color: textColor.withValues(
alpha: 0.72,
),
),
onSecondaryTap: PlatformInfo.isDesktop
? () => _showMessageActions(message)
: null,
),
),
],
);
}
return buildTextContent();
},
)
else else
Row( Column(
mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Flexible( if (MessageUrlImageHelper.hasPotentialImageUrl(
child: TranslatedMessageContent( message.text,
displayText: translatedDisplayText, ))
originalText: originalDisplayText, Padding(
style: TextStyle( padding: const EdgeInsets.only(bottom: 4),
color: textColor, child: Text(
fontSize: bodyFontSize * textScale, context.l10n.urlImage_possible,
style: TextStyle(
color: metaColor,
fontSize: 11 * textScale,
),
), ),
originalStyle: TextStyle(
fontSize: bodyFontSize * textScale,
fontStyle: FontStyle.italic,
color: textColor.withValues(alpha: 0.72),
),
onSecondaryTap: PlatformInfo.isDesktop
? () => _showMessageActions(message)
: null,
), ),
), buildTextContent(),
], ],
), ),
if (enableTracing && displayPath.isNotEmpty) ...[ if (enableTracing && displayPath.isNotEmpty) ...[
@@ -961,7 +1046,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
runSpacing: 6, runSpacing: 6,
children: message.reactions.entries.map((entry) { children: message.reactions.entries.map((entry) {
final emoji = entry.key; final emoji = entry.key;
final count = entry.value; final int count = entry.value.length;
return Container( return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
@@ -970,35 +1055,97 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
borderRadius: BorderRadius.circular(MeshRadii.pill), borderRadius: BorderRadius.circular(MeshRadii.pill),
border: Border.all(color: scheme.outlineVariant, width: 1), border: Border.all(color: scheme.outlineVariant, width: 1),
), ),
child: Row( child: InkWell(
mainAxisSize: MainAxisSize.min, onTap: () => _showReactionsReport(message),
children: [ child: Row(
Text( mainAxisSize: MainAxisSize.min,
emoji, children: [
style: MeshTheme.emoji(fontSize: 16),
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
),
),
if (count > 1) ...[
const SizedBox(width: 4),
Text( Text(
'$count', emoji,
style: MeshTheme.mono( style: MeshTheme.emoji(fontSize: 16),
fontSize: 11, textHeightBehavior: const TextHeightBehavior(
fontWeight: FontWeight.w700, applyHeightToFirstAscent: false,
color: scheme.onSurface, applyHeightToLastDescent: false,
), ),
), ),
if (count > 1) ...[
const SizedBox(width: 4),
Text(
'$count',
style: MeshTheme.mono(
fontSize: 11,
fontWeight: FontWeight.w700,
color: scheme.onSurface,
),
),
],
], ],
], ),
), ),
); );
}).toList(), }).toList(),
); );
} }
void _showReactionsReport(ChannelMessage message) {
final scheme = Theme.of(context).colorScheme;
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(context.l10n.reaction_report),
content: SizedBox(
width: double.maxFinite,
child: Scrollbar(
child: ListView(
shrinkWrap: true,
padding: const EdgeInsets.symmetric(vertical: 4),
children: message.reactionList().map((reaction) {
return Container(
padding: const EdgeInsetsDirectional.symmetric(vertical: 4),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
decoration: BoxDecoration(
color: scheme.surfaceContainerHigh,
borderRadius: BorderRadius.circular(MeshRadii.pill),
border: Border.all(
color: scheme.outlineVariant,
width: 1,
),
),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
reaction.emoji,
style: MeshTheme.emoji(fontSize: 16),
textHeightBehavior: const TextHeightBehavior(
applyHeightToFirstAscent: false,
applyHeightToLastDescent: false,
),
),
const SizedBox(width: 12),
Expanded(child: Text(reaction.senderName ?? '???')),
],
),
),
),
);
}).toList(),
),
),
),
),
);
}
Widget _buildPoiMessage( Widget _buildPoiMessage(
BuildContext context, BuildContext context,
MarkerPayload poi, MarkerPayload poi,
@@ -1079,10 +1226,9 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
/// Whether the image codec model is currently downloading. /// Whether the image codec model is currently downloading.
/// ///
/// The image button must stay hidden while the model downloads: an encode /// This must be read while [context] is building; popup item builders run
/// cannot start until the weights are on disk, and the preview sheet would /// from an overlay and cannot listen to a provider.
/// have nothing to show but a spinner. bool _isImageCodecDownloading(BuildContext context) {
bool get _imageCodecDownloading {
try { try {
return context.watch<ImageCodecService>().isDownloading; return context.watch<ImageCodecService>().isDownloading;
} on ProviderNotFoundException { } on ProviderNotFoundException {
@@ -1603,41 +1749,84 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
); );
} }
Widget _buildMessageComposer() { Widget _buildInputBar() {
final connector = context.watch<MeshCoreConnector>(); final connector = context.watch<MeshCoreConnector>();
final maxBytes = maxChannelMessageBytes(connector.selfName); final maxBytes = maxChannelMessageBytes(connector.selfName);
final settings = context.watch<AppSettingsService>().settings; final settings = context.watch<AppSettingsService>().settings;
final imageCodecDownloading = _isImageCodecDownloading(context);
final showImageAction =
settings.imageMessagesEnabled && !imageCodecDownloading;
final scheme = Theme.of(context).colorScheme; final scheme = Theme.of(context).colorScheme;
return Column( return Container(
mainAxisSize: MainAxisSize.min, decoration: BoxDecoration(
children: [ color: scheme.surface,
if (_replyingToMessage != null) border: Border(top: BorderSide(color: scheme.outlineVariant, width: 1)),
Builder( ),
builder: (context) { child: SafeArea(
final textScale = context.select<ChatTextScaleService, double>( child: Column(
(service) => service.scale, mainAxisSize: MainAxisSize.min,
); children: [
return _buildReplyBanner(textScale); if (_replyingToMessage != null)
}, Builder(
), builder: (context) {
if (_imageSendTotal > 0) _buildImageSendProgress(scheme), final textScale = context
Container( .select<ChatTextScaleService, double>(
decoration: BoxDecoration( (service) => service.scale,
color: scheme.surface, );
border: Border( return _buildReplyBanner(textScale);
top: BorderSide(color: scheme.outlineVariant, width: 1), },
), ),
), if (_imageSendTotal > 0) _buildImageSendProgress(scheme),
child: SafeArea( Padding(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6), padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
IconButton( PopupMenuButton<String>(
icon: const Icon(Icons.gif_box), icon: const Icon(Icons.add_circle_outline),
onPressed: () => _showGifPicker(context), position: PopupMenuPosition.over,
tooltip: context.l10n.chat_sendGif, offset: Offset(0, showImageAction ? -112 : -64),
tooltip: context.l10n.chat_selectSendAction,
onSelected: (action) {
switch (action) {
case 'gif':
_showGifPicker(context);
break;
case 'meshcore-image':
_showImageSendPreview();
break;
}
},
itemBuilder: (context) => [
PopupMenuItem(
value: 'gif',
child: Row(
children: [
const Icon(Icons.gif_box),
const SizedBox(width: 12),
Text(context.l10n.chat_sendGif),
],
),
),
if (showImageAction)
PopupMenuItem(
value: 'meshcore-image',
// Gated on the codec, not just the setting. The preview
// sheet explains why a send is impossible, but a fully
// live button in a build that cannot encode invites the
// tap that produces that explanation.
enabled:
_imageCodec?.availability ==
ImageCodecAvailability.ready,
child: Row(
children: [
const Icon(Icons.image_outlined),
const SizedBox(width: 12),
Text(context.l10n.chat_sendImageLora),
],
),
),
],
), ),
if (settings.translationEnabled) if (settings.translationEnabled)
MessageTranslationButton( MessageTranslationButton(
@@ -1645,17 +1834,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
languageCode: settings.translationTargetLanguageCode, languageCode: settings.translationTargetLanguageCode,
onPressed: _showTranslationOptions, onPressed: _showTranslationOptions,
), ),
if (settings.imageMessagesEnabled && !_imageCodecDownloading)
ImageSendButton(
// Gated on the codec, not just the setting. The preview
// sheet explains why a send is impossible, but a fully
// live button in a build that cannot encode invites the
// tap that produces that explanation.
enabled:
_imageCodec?.availability ==
ImageCodecAvailability.ready,
onPressed: () => _showImageSendPreview(),
),
Expanded( Expanded(
child: ValueListenableBuilder<TextEditingValue>( child: ValueListenableBuilder<TextEditingValue>(
valueListenable: _textController, valueListenable: _textController,
@@ -1787,9 +1965,9 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
], ],
), ),
), ),
), ],
), ),
], ),
); );
} }
@@ -2037,12 +2215,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
final connector = context.read<MeshCoreConnector>(); final connector = context.read<MeshCoreConnector>();
final emojiIndex = ReactionHelper.emojiToIndex(emoji); final emojiIndex = ReactionHelper.emojiToIndex(emoji);
if (emojiIndex == null) return; // Unknown emoji, skip if (emojiIndex == null) return; // Unknown emoji, skip
final timestampSecs = message.timestamp.millisecondsSinceEpoch ~/ 1000; final hash = message.computeReactionHash();
final hash = ReactionHelper.computeReactionHash(
timestampSecs,
message.senderName,
message.text,
);
final reactionText = ReactionHelper.encodeReaction(hash, emojiIndex); final reactionText = ReactionHelper.encodeReaction(hash, emojiIndex);
connector.sendChannelMessage(widget.channel, reactionText); connector.sendChannelMessage(widget.channel, reactionText);
} }
+12
View File
@@ -1533,6 +1533,7 @@ class _ChannelsScreenState extends State<ChannelsScreen>
final pskController = TextEditingController(text: channel.pskHex); final pskController = TextEditingController(text: channel.pskHex);
bool smazEnabled = connector.isChannelSmazEnabled(channel.index); bool smazEnabled = connector.isChannelSmazEnabled(channel.index);
bool cyr2latEnabled = connector.isChannelCyr2LatEnabled(channel.index); bool cyr2latEnabled = connector.isChannelCyr2LatEnabled(channel.index);
bool urlImagesEnabled = connector.isChannelUrlImagesEnabled(channel.index);
String? selectedCyr2LatProfileId = connector.getChannelCyr2LatProfileId( String? selectedCyr2LatProfileId = connector.getChannelCyr2LatProfileId(
channel.index, channel.index,
); );
@@ -1635,6 +1636,13 @@ class _ChannelsScreenState extends State<ChannelsScreen>
), ),
), ),
], ],
SwitchListTile(
contentPadding: EdgeInsets.zero,
title: Text(sheetContext.l10n.urlImage_enable),
value: urlImagesEnabled,
onChanged: (value) =>
setSheetState(() => urlImagesEnabled = value),
),
const SizedBox(height: 24), const SizedBox(height: 24),
], ],
), ),
@@ -1684,6 +1692,10 @@ class _ChannelsScreenState extends State<ChannelsScreen>
channel.index, channel.index,
cyr2latEnabled, cyr2latEnabled,
); );
await connector.setChannelUrlImagesEnabled(
channel.index,
urlImagesEnabled,
);
await connector.setChannelCyr2LatProfileId( await connector.setChannelCyr2LatProfileId(
channel.index, channel.index,
selectedCyr2LatProfileId, selectedCyr2LatProfileId,
+133 -23
View File
@@ -7,11 +7,13 @@ import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../utils/app_logger.dart';
import '../utils/platform_info.dart'; import '../utils/platform_info.dart';
import '../connector/meshcore_connector.dart'; import '../connector/meshcore_connector.dart';
import '../connector/meshcore_protocol.dart'; import '../connector/meshcore_protocol.dart';
import '../helpers/cyr2lat.dart'; import '../helpers/cyr2lat.dart';
import '../helpers/message_url_image_helper.dart';
import '../helpers/path_helper.dart'; import '../helpers/path_helper.dart';
import '../helpers/reaction_helper.dart'; import '../helpers/reaction_helper.dart';
import '../widgets/message_status_icon.dart'; import '../widgets/message_status_icon.dart';
@@ -477,10 +479,26 @@ class _ChatScreenState extends State<ChatScreen> {
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
IconButton( PopupMenuButton<String>(
icon: const Icon(Icons.gif_box), icon: const Icon(Icons.add_circle_outline),
onPressed: () => _showGifPicker(context), position: PopupMenuPosition.over,
tooltip: context.l10n.chat_sendGif, offset: const Offset(0, -64),
tooltip: context.l10n.chat_selectSendAction,
onSelected: (action) {
if (action == 'gif') _showGifPicker(context);
},
itemBuilder: (context) => [
PopupMenuItem(
value: 'gif',
child: Row(
children: [
const Icon(Icons.gif_box),
const SizedBox(width: 12),
Text(context.l10n.chat_sendGif),
],
),
),
],
), ),
if (settings.translationEnabled) if (settings.translationEnabled)
MessageTranslationButton( MessageTranslationButton(
@@ -878,6 +896,9 @@ class _ChatScreenState extends State<ChatScreen> {
bool cyr2latEnabled = connector.isContactCyr2LatEnabled( bool cyr2latEnabled = connector.isContactCyr2LatEnabled(
contact.publicKeyHex, contact.publicKeyHex,
); );
bool urlImagesEnabled = connector.isContactUrlImagesEnabled(
contact.publicKeyHex,
);
String? selectedCyr2LatProfileId = connector.getContactCyr2LatProfileId( String? selectedCyr2LatProfileId = connector.getContactCyr2LatProfileId(
contact.publicKeyHex, contact.publicKeyHex,
); );
@@ -977,6 +998,19 @@ class _ChatScreenState extends State<ChatScreen> {
), ),
], ],
const Divider(height: 8), const Divider(height: 8),
SwitchListTile(
contentPadding: EdgeInsets.zero,
title: Text(context.l10n.urlImage_enable),
value: urlImagesEnabled,
onChanged: (value) {
connector.setContactUrlImagesEnabled(
contact.publicKeyHex,
value,
);
setDialogState(() => urlImagesEnabled = value);
},
),
const Divider(height: 8),
SwitchListTile( SwitchListTile(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
title: Text(context.l10n.contact_teleBase), title: Text(context.l10n.contact_teleBase),
@@ -1281,6 +1315,7 @@ class _ChatScreenState extends State<ChatScreen> {
final senderName = liveContact.type == advTypeRoom final senderName = liveContact.type == advTypeRoom
? senderContact.name ? senderContact.name
: null; : null;
appLogger.info('Sending reaction using senderName: $senderName');
final hash = ReactionHelper.computeReactionHash( final hash = ReactionHelper.computeReactionHash(
timestampSecs, timestampSecs,
senderName, senderName,
@@ -1317,6 +1352,9 @@ class _MessageBubble extends StatelessWidget {
final gifId = GifHelper.parseGif(message.text); final gifId = GifHelper.parseGif(message.text);
final poi = parseMarkerText(message.text); final poi = parseMarkerText(message.text);
final isFailed = message.status == MessageStatus.failed; final isFailed = message.status == MessageStatus.failed;
final urlImagesEnabled = context.select<MeshCoreConnector, bool>(
(connector) => connector.isContactUrlImagesEnabled(sourceId),
);
// Bubble colors — outgoing uses MeshPalette.me / meBorder / meInk. // Bubble colors — outgoing uses MeshPalette.me / meBorder / meInk.
final bubbleColor = isFailed final bubbleColor = isFailed
@@ -1364,6 +1402,30 @@ class _MessageBubble extends StatelessWidget {
? message.originalText ? message.originalText
: (translatedDisplayText != messageText ? messageText : null); : (translatedDisplayText != messageText ? messageText : null);
Widget buildTextContent() {
return Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Flexible(
child: TranslatedMessageContent(
displayText: translatedDisplayText,
originalText: originalDisplayText,
style: TextStyle(
color: textColor,
fontSize: bodyFontSize * textScale,
),
originalStyle: TextStyle(
color: textColor.withValues(alpha: 0.72),
fontSize: bodyFontSize * textScale,
),
onSecondaryTap: PlatformInfo.isDesktop ? onLongPress : null,
),
),
],
);
}
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: 3), padding: const EdgeInsets.symmetric(vertical: 3),
child: Column( child: Column(
@@ -1451,28 +1513,76 @@ class _MessageBubble extends StatelessWidget {
), ),
], ],
) )
else if (urlImagesEnabled)
MessageUrlImageFutureBuilder(
messageId: message.messageId,
text: message.text,
builder: (context, snapshot) {
final imageAttachment = snapshot.data;
if (imageAttachment != null) {
return Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 4,
),
child: Align(
alignment: isOutgoing
? Alignment.centerRight
: Alignment.centerLeft,
child: MessageUrlImagePreview(
imageUrl: imageAttachment,
),
),
),
Padding(
padding: const EdgeInsets.only(top: 8),
child: TranslatedMessageContent(
displayText: translatedDisplayText,
originalText: originalDisplayText,
style: TextStyle(
color: textColor,
fontSize: bodyFontSize * textScale,
),
originalStyle: TextStyle(
color: textColor.withValues(
alpha: 0.72,
),
fontSize: bodyFontSize * textScale,
),
onSecondaryTap: PlatformInfo.isDesktop
? onLongPress
: null,
),
),
],
);
}
return buildTextContent();
},
)
else else
Row( Column(
mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Flexible( if (MessageUrlImageHelper.hasPotentialImageUrl(
child: TranslatedMessageContent( message.text,
displayText: translatedDisplayText, ))
originalText: originalDisplayText, Padding(
style: TextStyle( padding: const EdgeInsets.only(bottom: 4),
color: textColor, child: Text(
fontSize: bodyFontSize * textScale, context.l10n.urlImage_possible,
style: TextStyle(
color: metaColor,
fontSize: 11 * textScale,
),
), ),
originalStyle: TextStyle(
color: textColor.withValues(alpha: 0.72),
fontSize: bodyFontSize * textScale,
),
onSecondaryTap: PlatformInfo.isDesktop
? onLongPress
: null,
), ),
), buildTextContent(),
], ],
), ),
if (enableTracing && if (enableTracing &&
@@ -1654,7 +1764,7 @@ class _MessageBubble extends StatelessWidget {
runSpacing: 6, runSpacing: 6,
children: message.reactions.entries.map((entry) { children: message.reactions.entries.map((entry) {
final emoji = entry.key; final emoji = entry.key;
final count = entry.value; final count = entry.value.length;
final status = message.reactionStatuses[emoji]; final status = message.reactionStatuses[emoji];
final isPending = final isPending =
status == MessageStatus.pending || status == MessageStatus.sent; status == MessageStatus.pending || status == MessageStatus.sent;
+28 -4
View File
@@ -1,5 +1,6 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:meshcore_open/utils/gpx_export.dart'; import 'package:meshcore_open/utils/gpx_export.dart';
import 'package:meshcore_open/widgets/elements_ui.dart'; import 'package:meshcore_open/widgets/elements_ui.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@@ -299,12 +300,10 @@ class _SettingsScreenState extends State<SettingsScreen> {
value: connector.selfName!, value: connector.selfName!,
), ),
if (connector.selfPublicKey != null) if (connector.selfPublicKey != null)
_infoRow( _publicKeyRow(
context, context,
label: l10n.settings_infoPublicKey, label: l10n.settings_infoPublicKey,
value: publicKeyHex: pubKeyToHex(connector.selfPublicKey!),
'${pubKeyToHex(connector.selfPublicKey!).substring(0, 16)}...',
mono: true,
), ),
_infoRow( _infoRow(
context, context,
@@ -325,6 +324,31 @@ class _SettingsScreenState extends State<SettingsScreen> {
); );
} }
/// Copies the key rendered in the row, not whatever the connector holds when
/// the tap lands: a disconnect in between clears `selfPublicKey`.
Widget _publicKeyRow(
BuildContext context, {
required String label,
required String publicKeyHex,
}) {
return _infoRow(
context,
label: label,
value: publicKeyHex,
mono: true,
onTap: () => _copyPublicKey(context, publicKeyHex),
);
}
Future<void> _copyPublicKey(BuildContext context, String publicKeyHex) async {
await Clipboard.setData(ClipboardData(text: publicKeyHex));
if (!context.mounted) return;
showDismissibleSnackBar(
context,
content: Text(context.l10n.settings_publicKeyCopied),
);
}
Widget _infoRow( Widget _infoRow(
BuildContext context, { BuildContext context, {
required String label, required String label,
+74
View File
@@ -3,7 +3,9 @@ import 'dart:ui';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import '../helpers/message_url_image_helper.dart';
import '../helpers/reaction_helper.dart'; import '../helpers/reaction_helper.dart';
import '../l10n/app_localizations.dart'; import '../l10n/app_localizations.dart';
import '../utils/platform_info.dart'; import '../utils/platform_info.dart';
@@ -196,14 +198,40 @@ class NotificationService {
return text; return text;
} }
Future<String?> _resolveNotificationImagePath(
String text, {
required bool urlImagesEnabled,
}) async {
if (!urlImagesEnabled) return null;
final imageUrl = await MessageUrlImageHelper.parseVerified(text);
if (imageUrl == null) return null;
try {
// Cache the image so notification platforms can read it from disk.
final imageFile = await DefaultCacheManager().getSingleFile(imageUrl);
if (!imageFile.existsSync()) return null;
return imageFile.path;
} catch (e) {
debugPrint('Failed to resolve notification image: $e');
return null;
}
}
Future<void> _showMessageNotificationImpl({ Future<void> _showMessageNotificationImpl({
required String contactName, required String contactName,
required String message, required String message,
required bool urlImagesEnabled,
String? contactId, String? contactId,
int? badgeCount, int? badgeCount,
}) async { }) async {
if (!await _ensureCanNotify()) return; if (!await _ensureCanNotify()) return;
final imagePath = await _resolveNotificationImagePath(
message,
urlImagesEnabled: urlImagesEnabled,
);
final androidDetails = AndroidNotificationDetails( final androidDetails = AndroidNotificationDetails(
'messages', 'messages',
'Messages', 'Messages',
@@ -212,6 +240,12 @@ class NotificationService {
priority: Priority.high, priority: Priority.high,
icon: '@mipmap/ic_launcher', icon: '@mipmap/ic_launcher',
number: badgeCount, number: badgeCount,
styleInformation: imagePath != null
? BigPictureStyleInformation(
FilePathAndroidBitmap(imagePath),
summaryText: formatNotificationText(message),
)
: null,
); );
final iosDetails = DarwinNotificationDetails( final iosDetails = DarwinNotificationDetails(
@@ -219,6 +253,11 @@ class NotificationService {
presentBadge: true, presentBadge: true,
presentSound: true, presentSound: true,
badgeNumber: badgeCount, badgeNumber: badgeCount,
attachments: imagePath != null
? <DarwinNotificationAttachment>[
DarwinNotificationAttachment(imagePath),
]
: null,
); );
final macDetails = DarwinNotificationDetails( final macDetails = DarwinNotificationDetails(
@@ -226,6 +265,11 @@ class NotificationService {
presentBadge: true, presentBadge: true,
presentSound: true, presentSound: true,
badgeNumber: badgeCount, badgeNumber: badgeCount,
attachments: imagePath != null
? <DarwinNotificationAttachment>[
DarwinNotificationAttachment(imagePath),
]
: null,
); );
final notificationDetails = NotificationDetails( final notificationDetails = NotificationDetails(
@@ -299,11 +343,17 @@ class NotificationService {
Future<void> _showChannelMessageNotificationImpl({ Future<void> _showChannelMessageNotificationImpl({
required String channelName, required String channelName,
required String message, required String message,
required bool urlImagesEnabled,
int? channelIndex, int? channelIndex,
int? badgeCount, int? badgeCount,
}) async { }) async {
if (!await _ensureCanNotify()) return; if (!await _ensureCanNotify()) return;
final imagePath = await _resolveNotificationImagePath(
message,
urlImagesEnabled: urlImagesEnabled,
);
final androidDetails = AndroidNotificationDetails( final androidDetails = AndroidNotificationDetails(
'channel_messages', 'channel_messages',
'Channel Messages', 'Channel Messages',
@@ -312,6 +362,12 @@ class NotificationService {
priority: Priority.high, priority: Priority.high,
icon: '@mipmap/ic_launcher', icon: '@mipmap/ic_launcher',
number: badgeCount, number: badgeCount,
styleInformation: imagePath != null
? BigPictureStyleInformation(
FilePathAndroidBitmap(imagePath),
summaryText: formatNotificationText(message),
)
: null,
); );
final iosDetails = DarwinNotificationDetails( final iosDetails = DarwinNotificationDetails(
@@ -319,6 +375,11 @@ class NotificationService {
presentBadge: true, presentBadge: true,
presentSound: true, presentSound: true,
badgeNumber: badgeCount, badgeNumber: badgeCount,
attachments: imagePath != null
? <DarwinNotificationAttachment>[
DarwinNotificationAttachment(imagePath),
]
: null,
); );
final macDetails = DarwinNotificationDetails( final macDetails = DarwinNotificationDetails(
@@ -326,6 +387,11 @@ class NotificationService {
presentBadge: true, presentBadge: true,
presentSound: true, presentSound: true,
badgeNumber: badgeCount, badgeNumber: badgeCount,
attachments: imagePath != null
? <DarwinNotificationAttachment>[
DarwinNotificationAttachment(imagePath),
]
: null,
); );
final notificationDetails = NotificationDetails( final notificationDetails = NotificationDetails(
@@ -448,6 +514,7 @@ class NotificationService {
Future<void> showMessageNotification({ Future<void> showMessageNotification({
required String contactName, required String contactName,
required String message, required String message,
required bool urlImagesEnabled,
String? contactId, String? contactId,
int? badgeCount, int? badgeCount,
}) async { }) async {
@@ -458,6 +525,7 @@ class NotificationService {
type: _NotificationType.message, type: _NotificationType.message,
title: contactName, title: contactName,
body: message, body: message,
urlImagesEnabled: urlImagesEnabled,
id: contactId, id: contactId,
badgeCount: badgeCount, badgeCount: badgeCount,
), ),
@@ -485,6 +553,7 @@ class NotificationService {
required String channelName, required String channelName,
required String senderName, required String senderName,
required String message, required String message,
required bool urlImagesEnabled,
int? channelIndex, int? channelIndex,
int? badgeCount, int? badgeCount,
}) async { }) async {
@@ -495,6 +564,7 @@ class NotificationService {
type: _NotificationType.channelMessage, type: _NotificationType.channelMessage,
title: channelName, title: channelName,
body: '$senderName: $message', body: '$senderName: $message',
urlImagesEnabled: urlImagesEnabled,
id: channelIndex?.toString(), id: channelIndex?.toString(),
badgeCount: badgeCount, badgeCount: badgeCount,
), ),
@@ -556,6 +626,7 @@ class NotificationService {
await _showMessageNotificationImpl( await _showMessageNotificationImpl(
contactName: notification.title, contactName: notification.title,
message: notification.body, message: notification.body,
urlImagesEnabled: notification.urlImagesEnabled,
contactId: notification.id, contactId: notification.id,
badgeCount: notification.badgeCount, badgeCount: notification.badgeCount,
); );
@@ -571,6 +642,7 @@ class NotificationService {
await _showChannelMessageNotificationImpl( await _showChannelMessageNotificationImpl(
channelName: notification.title, channelName: notification.title,
message: notification.body, message: notification.body,
urlImagesEnabled: notification.urlImagesEnabled,
channelIndex: int.tryParse(notification.id ?? ''), channelIndex: int.tryParse(notification.id ?? ''),
badgeCount: notification.badgeCount, badgeCount: notification.badgeCount,
); );
@@ -647,6 +719,7 @@ class _PendingNotification {
final _NotificationType type; final _NotificationType type;
final String title; final String title;
final String body; final String body;
final bool urlImagesEnabled;
final String? id; final String? id;
final int? badgeCount; final int? badgeCount;
@@ -654,6 +727,7 @@ class _PendingNotification {
required this.type, required this.type,
required this.title, required this.title,
required this.body, required this.body,
this.urlImagesEnabled = false,
this.id, this.id,
this.badgeCount, this.badgeCount,
}); });
@@ -4,6 +4,16 @@ import '../models/path_selection.dart';
import '../connector/meshcore_connector.dart'; import '../connector/meshcore_connector.dart';
import '../connector/meshcore_protocol.dart'; import '../connector/meshcore_protocol.dart';
/// Companion firmware (MeshCore commit 4a869163, 2025-12-30) replaces the CLI
/// frame timestamp with the companion node's RTC for TXT_TYPE_CLI_DATA, so a
/// plain "clock sync" sets the repeater clock to the node clock. The official
/// meshcore-cli translates it to an explicit `time <epoch>` command instead;
/// do the same so the repeater always gets the phone's time.
String normalizeRepeaterClockSyncCommand(String command, {int? nowSeconds}) {
final epoch = nowSeconds ?? DateTime.now().millisecondsSinceEpoch ~/ 1000;
return command.trim().toLowerCase() == 'clock sync' ? 'time $epoch' : command;
}
class RepeaterCommandService { class RepeaterCommandService {
final MeshCoreConnector _connector; final MeshCoreConnector _connector;
final Map<String, Completer<String>> _pendingCommands = {}; final Map<String, Completer<String>> _pendingCommands = {};
@@ -25,6 +35,7 @@ class RepeaterCommandService {
Function(int)? onAttempt, Function(int)? onAttempt,
int retries = maxRetries, int retries = maxRetries,
}) async { }) async {
command = normalizeRepeaterClockSyncCommand(command);
final attemptCount = retries < 1 ? 1 : retries; final attemptCount = retries < 1 ? 1 : retries;
final selection = await _connector.preparePathForContactSend(repeater); final selection = await _connector.preparePathForContactSend(repeater);
+6 -1
View File
@@ -195,7 +195,12 @@ class ChannelMessageStore {
replyToText: json['replyToText'] as String?, replyToText: json['replyToText'] as String?,
reactions: reactions:
(json['reactions'] as Map<String, dynamic>?)?.map( (json['reactions'] as Map<String, dynamic>?)?.map(
(key, value) => MapEntry(key, value as int), (key, value) => MapEntry(
key,
(value is int)
? List<String?>.filled(value, null)
: List<String?>.from(value),
),
) ?? ) ??
{}, {},
); );
+27
View File
@@ -4,6 +4,7 @@ import 'prefs_manager.dart';
class ChannelSettingsStore { class ChannelSettingsStore {
static const String _keyPrefix = 'channel_smaz_'; static const String _keyPrefix = 'channel_smaz_';
static const String _cyr2latKeyPrefix = 'channel_cyr2lat_'; static const String _cyr2latKeyPrefix = 'channel_cyr2lat_';
static const String _urlImagesKeyPrefix = 'channel_url_images_';
String publicKeyHex = ''; String publicKeyHex = '';
set setPublicKeyHex(String value) => set setPublicKeyHex(String value) =>
@@ -11,6 +12,7 @@ class ChannelSettingsStore {
String get keyFor => '$_keyPrefix$publicKeyHex'; String get keyFor => '$_keyPrefix$publicKeyHex';
String get keyForCyr2Lat => '$_cyr2latKeyPrefix$publicKeyHex'; String get keyForCyr2Lat => '$_cyr2latKeyPrefix$publicKeyHex';
String get keyForUrlImages => '$_urlImagesKeyPrefix$publicKeyHex';
Future<bool> loadSmazEnabled(int channelIndex) async { Future<bool> loadSmazEnabled(int channelIndex) async {
if (publicKeyHex.isEmpty) { if (publicKeyHex.isEmpty) {
@@ -73,6 +75,31 @@ class ChannelSettingsStore {
await prefs.setBool(key, enabled); await prefs.setBool(key, enabled);
} }
Future<bool> loadUrlImagesEnabled(int channelIndex) async {
if (publicKeyHex.isEmpty) {
appLogger.warn(
'Public key hex is not set. Cannot load channel URL image settings.',
);
return false;
}
final prefs = PrefsManager.instance;
final key = '$keyForUrlImages$channelIndex';
return prefs.getBool(key) ?? false;
}
Future<void> saveUrlImagesEnabled(int channelIndex, bool enabled) async {
if (publicKeyHex.isEmpty) {
appLogger.warn(
'Public key hex is not set. Cannot save channel URL image settings.',
);
return;
}
await PrefsManager.instance.setBool(
'$keyForUrlImages$channelIndex',
enabled,
);
}
Future<String?> loadCyr2LatProfileId(int channelIndex) async { Future<String?> loadCyr2LatProfileId(int channelIndex) async {
if (publicKeyHex.isEmpty) { if (publicKeyHex.isEmpty) {
appLogger.warn( appLogger.warn(
+27
View File
@@ -4,6 +4,7 @@ import 'prefs_manager.dart';
class ContactSettingsStore { class ContactSettingsStore {
static const String _keyPrefix = 'contact_smaz_'; static const String _keyPrefix = 'contact_smaz_';
static const String _cyr2latKeyPrefix = 'contact_cyr2lat_'; static const String _cyr2latKeyPrefix = 'contact_cyr2lat_';
static const String _urlImagesKeyPrefix = 'contact_url_images_';
String publicKeyHex = ''; String publicKeyHex = '';
set setPublicKeyHex(String value) => set setPublicKeyHex(String value) =>
@@ -11,6 +12,7 @@ class ContactSettingsStore {
String get keyFor => '$_keyPrefix$publicKeyHex'; String get keyFor => '$_keyPrefix$publicKeyHex';
String get keyForCyr2Lat => '$_cyr2latKeyPrefix$publicKeyHex'; String get keyForCyr2Lat => '$_cyr2latKeyPrefix$publicKeyHex';
String get keyForUrlImages => '$_urlImagesKeyPrefix$publicKeyHex';
Future<bool> loadSmazEnabled(String contactKeyHex) async { Future<bool> loadSmazEnabled(String contactKeyHex) async {
if (publicKeyHex.isEmpty) { if (publicKeyHex.isEmpty) {
@@ -73,6 +75,31 @@ class ContactSettingsStore {
await prefs.setBool(key, enabled); await prefs.setBool(key, enabled);
} }
Future<bool> loadUrlImagesEnabled(String contactKeyHex) async {
if (publicKeyHex.isEmpty) {
appLogger.warn(
'Public key hex is not set. Cannot load contact URL image settings.',
);
return false;
}
final prefs = PrefsManager.instance;
final key = '$keyForUrlImages$contactKeyHex';
return prefs.getBool(key) ?? false;
}
Future<void> saveUrlImagesEnabled(String contactKeyHex, bool enabled) async {
if (publicKeyHex.isEmpty) {
appLogger.warn(
'Public key hex is not set. Cannot save contact URL image settings.',
);
return;
}
await PrefsManager.instance.setBool(
'$keyForUrlImages$contactKeyHex',
enabled,
);
}
Future<String?> loadCyr2LatProfileId(String contactKeyHex) async { Future<String?> loadCyr2LatProfileId(String contactKeyHex) async {
if (publicKeyHex.isEmpty) { if (publicKeyHex.isEmpty) {
appLogger.warn( appLogger.warn(
+6 -1
View File
@@ -171,7 +171,12 @@ class MessageStore {
pathBytes: decodedPathBytes, pathBytes: decodedPathBytes,
reactions: reactions:
(json['reactions'] as Map<String, dynamic>?)?.map( (json['reactions'] as Map<String, dynamic>?)?.map(
(key, value) => MapEntry(key, value as int), (key, value) => MapEntry(
key,
(value is int)
? List<String?>.filled(value, null)
: List<String?>.from(value),
),
) ?? ) ??
{}, {},
reactionStatuses: reactionStatuses:
+23 -2
View File
@@ -7,6 +7,7 @@ import 'dart:io';
import '../utils/platform_info.dart'; import '../utils/platform_info.dart';
import 'package:share_plus/share_plus.dart'; import 'package:share_plus/share_plus.dart';
import 'package:file_selector/file_selector.dart';
class ContactExport { class ContactExport {
final String name; final String name;
@@ -161,7 +162,6 @@ class GpxExport {
final xml = GpxWriter().asString(gpx, pretty: true); final xml = GpxWriter().asString(gpx, pretty: true);
// 2. Save to file // 2. Save to file
final dir = await getApplicationDocumentsDirectory();
final timestamp = DateTime.now() final timestamp = DateTime.now()
.toUtc() .toUtc()
.toIso8601String() .toIso8601String()
@@ -169,8 +169,29 @@ class GpxExport {
.replaceAll('.', '-') .replaceAll('.', '-')
.split('T') .split('T')
.join('_'); .join('_');
final suggestedName = '$filename$timestamp.gpx';
final path = '${dir.path}/$filename$timestamp.gpx'; // share_plus cannot share files on desktop: Linux throws outright
// ("Sharing files not supported on Linux") and Windows only supports it
// from build 10.0.17763 up. Desktops have a real file system and a save
// dialog, so write the file where the user asks instead of sharing it.
if (PlatformInfo.isDesktop) {
final location = await getSaveLocation(
suggestedName: suggestedName,
acceptedTypeGroups: const [
XTypeGroup(label: 'GPX', extensions: ['gpx']),
],
);
if (location == null) {
debugPrint('Save dialog was dismissed / cancelled by user.');
return gpxExportCancelled;
}
await File(location.path).writeAsString(xml);
return gpxExportSuccess;
}
final dir = await getApplicationDocumentsDirectory();
final path = '${dir.path}/$suggestedName';
final file = File(path); final file = File(path);
await file.writeAsString(xml); await file.writeAsString(xml);
-25
View File
@@ -1,25 +0,0 @@
import 'package:flutter/material.dart';
import '../l10n/l10n.dart';
class ImageSendButton extends StatelessWidget {
final bool enabled;
final VoidCallback onPressed;
final String? tooltip;
const ImageSendButton({
super.key,
required this.enabled,
required this.onPressed,
this.tooltip,
});
@override
Widget build(BuildContext context) {
return IconButton(
icon: Icon(enabled ? Icons.image : Icons.image_outlined),
onPressed: enabled ? onPressed : null,
tooltip: tooltip ?? context.l10n.chat_sendImage,
);
}
}
+5 -1
View File
@@ -7,6 +7,7 @@ import '../l10n/l10n.dart';
import '../models/contact.dart'; import '../models/contact.dart';
import '../l10n/contact_localization.dart'; import '../l10n/contact_localization.dart';
import '../services/storage_service.dart'; import '../services/storage_service.dart';
import '../services/repeater_command_service.dart';
import '../connector/meshcore_connector.dart'; import '../connector/meshcore_connector.dart';
import '../connector/meshcore_protocol.dart'; import '../connector/meshcore_protocol.dart';
import '../theme/mesh_theme.dart'; import '../theme/mesh_theme.dart';
@@ -201,7 +202,10 @@ class _RepeaterLoginDialogState extends State<RepeaterLoginDialog> {
await _connector.sendFrame( await _connector.sendFrame(
buildSendCliCommandFrame( buildSendCliCommandFrame(
repeater.publicKey, repeater.publicKey,
'clock sync', normalizeRepeaterClockSyncCommand(
'clock sync',
nowSeconds: timestampSeconds,
),
timestampSeconds: timestampSeconds, timestampSeconds: timestampSeconds,
), ),
); );
+2 -1
View File
@@ -42,7 +42,7 @@ dependencies:
flserial: flserial:
git: git:
url: https://github.com/MeshEnvy/flserial.git url: https://github.com/MeshEnvy/flserial.git
ref: 48216310061efc8d5d217cc18014fc2cb501646e ref: e1864de9b65cda9656dba804329bdd2890dd5a92
provider: ^6.1.5+1 provider: ^6.1.5+1
shared_preferences: ^2.2.2 shared_preferences: ^2.2.2
uuid: ^4.3.3 uuid: ^4.3.3
@@ -83,6 +83,7 @@ dependencies:
# the abiFilters note in android/app/build.gradle.kts; a universal APK pays # the abiFilters note in android/app/build.gradle.kts; a universal APK pays
# ~56 MB for ORT instead of ~18 MB. # ~56 MB for ORT instead of ~18 MB.
flutter_onnxruntime: ^1.8.3 flutter_onnxruntime: ^1.8.3
base32: ^2.2.0
hooks: hooks:
user_defines: user_defines:
@@ -0,0 +1,108 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:http/http.dart' as http;
import 'package:http/testing.dart';
import 'package:meshcore_open/helpers/message_url_image_helper.dart';
void main() {
group('MessageUrlImageHelper', () {
tearDown(() => MessageUrlImageHelper.httpClient = null);
void mockPyxPage(String id) {
MessageUrlImageHelper.httpClient = MockClient((request) async {
expect(request.url.toString(), 'https://pyx.li/?i=$id');
return http.Response(
'<html><body><img src="/i/$id.jpg"></body></html>',
200,
headers: {'content-type': 'text/html; charset=utf-8'},
);
});
}
test('parses short pyx ids', () async {
mockPyxPage('RzmdkTsE');
final attachment = await MessageUrlImageHelper.parse(
'my picture: https://pyx.li/?i=RzmdkTsE text',
);
expect(attachment, 'https://pyx.li/i/RzmdkTsE.jpg');
});
test('parses direct pyx image urls', () async {
mockPyxPage('Cd1KFiwu');
final attachment = await MessageUrlImageHelper.parse(
'https://pyx.li/?i=Cd1KFiwu',
);
expect(attachment, 'https://pyx.li/i/Cd1KFiwu.jpg');
});
test('parses provider-hosted ipfs links', () async {
final attachment = await MessageUrlImageHelper.parse(
'my picture: https://uneven-plum-tarantula.myfilebase.com/ipfs/bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly text',
);
expect(attachment, isNotNull);
expect(
attachment,
'https://uneven-plum-tarantula.myfilebase.com/ipfs/bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly',
);
});
test('parses direct ipfs cid urls', () async {
final attachment = await MessageUrlImageHelper.parse(
'my picture: ipfs://bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly text',
);
expect(attachment, isNotNull);
expect(
attachment,
'https://ipfs.io/ipfs/bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly',
);
});
test('parses direct ipfs cid urls without double slashes', () async {
final attachment = await MessageUrlImageHelper.parse(
'my picture: ipfs:bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly text',
);
expect(
attachment,
'https://ipfs.io/ipfs/bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly',
);
});
test('parses http image urls', () async {
final attachment = await MessageUrlImageHelper.parse(
'see this image https://example.com/picture.png?size=large additional text',
);
expect(attachment, isNotNull);
expect(attachment, 'https://example.com/picture.png?size=large');
});
test('returns null for plain text', () async {
expect(await MessageUrlImageHelper.parse('hello world'), isNull);
});
test('detects supported image URLs without resolving them', () {
expect(
MessageUrlImageHelper.hasPotentialImageUrl(
'https://pyx.li/?i=RzmdkTsE',
),
isTrue,
);
expect(
MessageUrlImageHelper.hasPotentialImageUrl('hello world'),
isFalse,
);
});
test('returns null for non-image ipfs gateway URL', () async {
final attachment = await MessageUrlImageHelper.parseVerified(
'https://lime-famous-rat-748.mypinata.cloud/ipfs/bafybeih3jqv36rsxqx7yw3k3ixhganrevrk7xmcxgkr2zuzjegxdytb3nq',
);
expect(attachment, isNull);
});
});
}
+157
View File
@@ -1,3 +1,4 @@
import 'package:characters/characters.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:meshcore_open/helpers/reaction_helper.dart'; import 'package:meshcore_open/helpers/reaction_helper.dart';
import 'package:meshcore_open/widgets/emoji_picker.dart'; import 'package:meshcore_open/widgets/emoji_picker.dart';
@@ -340,6 +341,162 @@ void main() {
}); });
}); });
group('MeshCoreOne Reactions', () {
test('emoji validation sanity checks', () {
// This is more a test of expectations than of app code, but it was
// a good place to get this sorted out cleanly, and I leave it for
// anyone interested in understanding the emoji validation and tests.
expect('🥳'.length, equals(2));
expect('\u{1f44c}\u{1f3ff}'.length, equals(4));
final oneChar = RegExp(r'^(.)$');
final twoChar = RegExp(r'^(..)$');
expect(oneChar.firstMatch('🥳'), isNull);
expect(oneChar.firstMatch('\u{1F642}'), isNull);
expect(oneChar.firstMatch('\u{1f44c}\u{1f3ff}'), isNull);
expect(twoChar.firstMatch('\u{1f44c}\u{1f3ff}'), isNull);
final regex = RegExp(r'^(.{1,4})$');
expect(regex.firstMatch('🥳'), isNotNull);
expect(regex.firstMatch('😀'), isNotNull);
expect(regex.firstMatch('\u{1F642}'), isNotNull);
expect(regex.firstMatch('\u{1f44c}\u{1f3ff}'), isNotNull);
expect(Characters('🥳').length, equals(1));
expect(Characters('\u{1F642}').length, equals(1));
expect(Characters('\u{1F642}').length, equals(1));
expect(Characters('\u{1f44c}\u{1f3ff}').length, equals(1));
expect(Characters('🧑‍🧑‍🧒‍🧒').length, equals(1));
});
test('parse MeshCoreOne reaction', () {
final emoji = '🥳';
final senderName = 'entropy 📓';
final hash = 'b3je6qf7';
final info = ReactionHelper.parseReactionMC1(
'@[$senderName]$emoji\n$hash',
);
expect(info, isNotNull);
expect(info!.targetHash, equals('$hash:$senderName'));
expect(info.emoji, equals(emoji));
List<String> messages = [
'🥳\n01234567',
'@[entropy]🥳\n01234567',
'\u{1f44c}\u{1f3ff}\n01234567',
'@[entropy]\u{1f44c}\u{1f3ff}\n01234567',
'@[entropy]🧑‍🧑‍🧒\n01234567', // long composite emoji - 21 bytes
'🧑‍🧑‍🧒‍🧒\n01234567', // long composite emoji - 25 bytes
];
for (String txt in messages) {
final info = ReactionHelper.parseReactionMC1(txt);
expect(info, isNotNull, reason: "$txt did not parse");
}
});
test('parse MeshCoreOne reaction - avoid false positives', () {
List<String> messages = [
'test\nabcdefgh',
'🥳\nhashistoolong',
'🥳\nshort',
'🥳🥳\n01234567', // two emojis not composed into one grapheme
'X\n01234567',
'🥳\nabcuuxyz', // u is not valid as we don't support checksums
];
for (String txt in messages) {
final info = ReactionHelper.parseReactionMC1(txt);
expect(info, isNull, reason: "$txt should not have parsed");
}
});
test('parse MeshCoreOne reaction - Legacy format', () {
final emoji = '🥳';
final senderName = 'entropy 📓';
final hash = 'b3je6qf7';
final info = ReactionHelper.parseReactionMC1Legacy(
'$emoji@[$senderName]\n$hash',
);
expect(info, isNotNull);
expect(info!.targetHash, equals('$hash:$senderName'));
expect(info.emoji, equals(emoji));
List<String> messages = [
'🥳\n01234567',
'🥳@[entropy]\n01234567',
'\u{1f44c}\u{1f3ff}\n01234567',
'\u{1f44c}\u{1f3ff}@[entropy]\n01234567',
'🧑‍🧑‍🧒@[entropy]\n01234567', // long composite emoji - 21 bytes
'🧑‍🧑‍🧒‍🧒\n01234567', // long composite emoji - 25 bytes
];
for (String txt in messages) {
final info = ReactionHelper.parseReactionMC1Legacy(txt);
expect(info, isNotNull, reason: "$txt did not parse");
}
});
test(
'parse MeshCoreOne reaction - Legacy format - avoid false positives',
() {
List<String> messages = [
'test\nabcdefgh',
'🥳\nhashistoolong',
'🥳\nshort',
'🥳🥳\n01234567', // two emojis not composed into one grapheme
'X\n01234567',
'🥳\nabcuuxyz', // u is not valid as we don't support checksums
];
for (String txt in messages) {
final info = ReactionHelper.parseReactionMC1Legacy(txt);
expect(info, isNull, reason: "$txt should not have parsed");
}
},
);
test('parse MeshCoreOne reaction - main entry', () {
final emoji = '🥳';
final senderName = 'entropy 📓';
final hash = 'b3je6qf7';
final info = ReactionHelper.parseReaction(
'@[$senderName]$emoji\n$hash',
);
expect(info, isNotNull);
expect(info!.targetHash, equals('$hash:$senderName'));
expect(info.emoji, equals(emoji));
});
test('parse MeshCoreOne reaction Legacy format - main entry', () {
final emoji = '🥳';
final senderName = 'entropy 📓';
final hash = 'b3je6qf7';
final info = ReactionHelper.parseReaction(
'$emoji@[$senderName]\n$hash',
);
expect(info, isNotNull);
expect(info!.targetHash, equals('$hash:$senderName'));
expect(info.emoji, equals(emoji));
});
test('parse MeshCoreOne reaction for DM chats', () {
final emoji = '🥳';
final hash = 'b3je6qf7';
final info = ReactionHelper.parseReaction('$emoji\n$hash');
expect(info, isNotNull);
expect(info!.targetHash, equals('$hash:'));
expect(info.emoji, equals(emoji));
});
test('computeq MeshCoreOne reaction hash', () {
const timestamp = 1234567890;
const senderName = 'Alice';
const messageText = 'Hello world!';
final hash = ReactionHelper.computeReactionHashMC1(
timestamp,
senderName,
messageText,
);
expect(hash, equals('tyvbkb33'));
});
});
group('full reaction flow', () { group('full reaction flow', () {
test('should encode and decode reaction correctly', () { test('should encode and decode reaction correctly', () {
// Simulate sending a reaction // Simulate sending a reaction
@@ -0,0 +1,46 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:meshcore_open/services/repeater_command_service.dart';
void main() {
group('normalizeRepeaterClockSyncCommand', () {
test('translates "clock sync" to explicit time command', () {
final result = normalizeRepeaterClockSyncCommand(
'clock sync',
nowSeconds: 1787900000,
);
expect(result, 'time 1787900000');
});
test('is case-insensitive and tolerates surrounding whitespace', () {
expect(
normalizeRepeaterClockSyncCommand(' Clock Sync ', nowSeconds: 1),
'time 1',
);
});
test('passes other commands through unchanged', () {
expect(
normalizeRepeaterClockSyncCommand('clock', nowSeconds: 1),
'clock',
);
expect(
normalizeRepeaterClockSyncCommand('get radio', nowSeconds: 1),
'get radio',
);
expect(
normalizeRepeaterClockSyncCommand('time 123', nowSeconds: 1),
'time 123',
);
});
test('uses current time when nowSeconds is omitted', () {
final before = DateTime.now().millisecondsSinceEpoch ~/ 1000;
final result = normalizeRepeaterClockSyncCommand('clock sync');
final after = DateTime.now().millisecondsSinceEpoch ~/ 1000;
expect(result, startsWith('time '));
final epoch = int.parse(result.substring('time '.length));
expect(epoch, inInclusiveRange(before, after));
});
});
}
+116 -1
View File
@@ -1 +1,116 @@
{} {
"bg": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"de": [
"settings_publicKeyCopied",
"reaction_report"
],
"es": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"fr": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"hu": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"it": [
"urlImage_enable",
"urlImage_possible",
"reaction_report"
],
"ja": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"ko": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"nl": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"pl": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"pt": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"ru": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"sk": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"sl": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"sv": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied"
],
"uk": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
],
"zh": [
"urlImage_enable",
"urlImage_possible",
"settings_publicKeyCopied",
"reaction_report"
]
}