mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-04-17 08:11:50 +02:00
translations and mentions enabled for channel messages while printing
This commit is contained in:
parent
512547dda5
commit
3e8a4e87d6
@ -177,6 +177,7 @@ class EventData {
|
||||
|
||||
switch(kind) {
|
||||
case 1:
|
||||
case 42:
|
||||
evaluatedContent = expandMentions(content);
|
||||
if( translator != null && gTranslate && !evaluatedContent.isEnglish()) {
|
||||
if( gDebug > 0) print("found that this comment is non-English: $evaluatedContent");
|
||||
@ -287,11 +288,12 @@ class EventData {
|
||||
}
|
||||
|
||||
String getAsLine({int len = 20}) {
|
||||
if( len == 0 || len > content.length) {
|
||||
len = content.length;
|
||||
String contentToPrint = evaluatedContent.isEmpty? content: evaluatedContent;
|
||||
if( len == 0 || len > contentToPrint.length) {
|
||||
len = contentToPrint.length;
|
||||
}
|
||||
|
||||
return '"${content.substring(0, len)}..." - ${getAuthorName(pubkey)}';
|
||||
return '"${contentToPrint.substring(0, len)}..." - ${getAuthorName(pubkey)}';
|
||||
}
|
||||
|
||||
String getStrForChannel(int depth) {
|
||||
@ -299,7 +301,7 @@ class EventData {
|
||||
String name = getAuthorName(pubkey);
|
||||
String strDate = getPrintableDate(createdAt);
|
||||
String tempEvaluatedContent = evaluatedContent;
|
||||
String tempContent = content;
|
||||
String tempContent = evaluatedContent.isEmpty? content: evaluatedContent;
|
||||
|
||||
if( isHidden) {
|
||||
name = "<hidden>";
|
||||
|
@ -1,7 +1,8 @@
|
||||
name: nostr_console
|
||||
description: A multi-platform nostr client built for terminal/console.
|
||||
version: 0.0.7-beta
|
||||
homepage: https://github.com/vishalxl/nostr_console for 3-4 sept 2022
|
||||
homepage: https://github.com/vishalxl/nostr_console
|
||||
# translations and mentions enabled for channel messages while printing
|
||||
|
||||
# build where dm can be read
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user