mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-12-01 00:07:16 +01:00
improved direct room printing
This commit is contained in:
@@ -585,7 +585,6 @@ Future<void> PrivateMenuUI(Store node) async {
|
|||||||
|
|
||||||
await processNotifications(node); // this takes 300 ms
|
await processNotifications(node); // this takes 300 ms
|
||||||
|
|
||||||
bool showAllRooms (ScrollableMessages room) => selectorShowAllRooms(room);
|
|
||||||
node.printDirectRoomInfo(showAllRooms);
|
node.printDirectRoomInfo(showAllRooms);
|
||||||
|
|
||||||
int option = showMenu([
|
int option = showMenu([
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ bool selectorShowAllRooms(ScrollableMessages room) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool showAllRooms (ScrollableMessages room) => selectorShowAllRooms(room);
|
||||||
|
|
||||||
int getLatestMessageTime(List<String> _messageIds) {
|
int getLatestMessageTime(List<String> _messageIds) {
|
||||||
if( _messageIds.length <= 0 || gStore == null) {
|
if( _messageIds.length <= 0 || gStore == null) {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1179,12 +1181,16 @@ class Store {
|
|||||||
numNotificationRooms++;
|
numNotificationRooms++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( numNotificationRooms == 0) {
|
// even if num rooms is zero, we will show the heading when its show all rooms
|
||||||
|
if( numNotificationRooms == 0 && roomSelector != showAllRooms) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int numRoomsActuallyPrinted = 0;
|
int numRoomsActuallyPrinted = 0;
|
||||||
print("\n\nDirect messages inbox:");
|
print("");
|
||||||
|
print("Direct messages inbox:");
|
||||||
|
print("\n");
|
||||||
|
|
||||||
printUnderlined(" From Num of Messages Latest Message ");
|
printUnderlined(" From Num of Messages Latest Message ");
|
||||||
for( int j = 0; j < directRooms.length; j++) {
|
for( int j = 0; j < directRooms.length; j++) {
|
||||||
if( !roomSelector(directRooms[j]))
|
if( !roomSelector(directRooms[j]))
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ version: 0.0.7-beta
|
|||||||
homepage: https://github.com/vishalxl/nostr_console
|
homepage: https://github.com/vishalxl/nostr_console
|
||||||
|
|
||||||
|
|
||||||
# Release 0.0.7-beta fixed contact fetching
|
# Release 0.0.7-beta direct room printing improved
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.17.3 <3.0.0'
|
sdk: '>=2.17.3 <3.0.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user