mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-21 18:05:28 +10:00
feat(localization): update contact settings translations for multiple languages
- Translated contact settings and related strings in Slovenian, Swedish, Ukrainian, Chinese, Dutch, Polish, Portuguese, Russian, and Slovak. - Added new strings for discovered contacts actions such as adding, copying, and deleting contacts. - Enhanced the DiscoveryContact model to include a rawPacket field for better data handling. - Updated the contacts screen to support new actions in the context menu for discovered contacts. - Improved the contact discovery store to handle the serialization of the new rawPacket field.
This commit is contained in:
@@ -30,6 +30,7 @@ class ContactDiscoveryStore {
|
||||
|
||||
Map<String, dynamic> _toJson(DiscoveryContact contact) {
|
||||
return {
|
||||
'rawPacket': base64Encode(contact.rawPacket),
|
||||
'publicKey': base64Encode(contact.publicKey),
|
||||
'name': contact.name,
|
||||
'type': contact.type,
|
||||
@@ -44,6 +45,7 @@ class ContactDiscoveryStore {
|
||||
DiscoveryContact _fromJson(Map<String, dynamic> json) {
|
||||
final lastSeenMs = json['lastSeen'] as int? ?? 0;
|
||||
return DiscoveryContact(
|
||||
rawPacket: Uint8List.fromList(base64Decode(json['rawPacket'] as String)),
|
||||
publicKey: Uint8List.fromList(base64Decode(json['publicKey'] as String)),
|
||||
name: json['name'] as String? ?? 'Unknown',
|
||||
type: json['type'] as int? ?? 0,
|
||||
|
||||
Reference in New Issue
Block a user