improved direct room printing

This commit is contained in:
Vishal 2022-09-18 02:33:54 +05:30
parent 73ddf92a57
commit c7551d5dfd
3 changed files with 9 additions and 4 deletions

View File

@ -585,7 +585,6 @@ Future<void> PrivateMenuUI(Store node) async {
await processNotifications(node); // this takes 300 ms
bool showAllRooms (ScrollableMessages room) => selectorShowAllRooms(room);
node.printDirectRoomInfo(showAllRooms);
int option = showMenu([

View File

@ -19,6 +19,8 @@ bool selectorShowAllRooms(ScrollableMessages room) {
return true;
}
bool showAllRooms (ScrollableMessages room) => selectorShowAllRooms(room);
int getLatestMessageTime(List<String> _messageIds) {
if( _messageIds.length <= 0 || gStore == null) {
return 0;
@ -1179,12 +1181,16 @@ class Store {
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;
}
int numRoomsActuallyPrinted = 0;
print("\n\nDirect messages inbox:");
print("");
print("Direct messages inbox:");
print("\n");
printUnderlined(" From Num of Messages Latest Message ");
for( int j = 0; j < directRooms.length; j++) {
if( !roomSelector(directRooms[j]))

View File

@ -4,7 +4,7 @@ version: 0.0.7-beta
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:
sdk: '>=2.17.3 <3.0.0'