@@ -1217,10 +1217,10 @@ let strCurrentReplyReference = "";
1217
1217
* @param {boolean } fClicked - Whether the chat was opened manually or not
1218
1218
*/
1219
1219
async function updateChat ( profile , arrMessages = [ ] , fClicked = false ) {
1220
- if ( profile ?. messages . length || arrMessages . length ) {
1221
- // If this chat is our own npub: then we consider this our Bookmarks/Notes section
1222
- const fNotes = strOpenChat === strPubkey ;
1220
+ // If this chat is our own npub: then we consider this our Bookmarks/Notes section
1221
+ const fNotes = strOpenChat === strPubkey ;
1223
1222
1223
+ if ( profile ?. messages . length || arrMessages . length ) {
1224
1224
// Prefer displaying their name, otherwise, npub
1225
1225
if ( fNotes ) {
1226
1226
domChatContact . textContent = 'Notes' ;
@@ -1405,12 +1405,16 @@ async function updateChat(profile, arrMessages = [], fClicked = false) {
1405
1405
}
1406
1406
} else {
1407
1407
// Probably a 'New Chat', as such, we'll mostly render an empty chat
1408
- domChatContact . textContent = profile ?. name || strOpenChat . substring ( 0 , 10 ) + '…' ;
1408
+ if ( fNotes ) {
1409
+ domChatContact . textContent = 'Notes' ;
1410
+ } else {
1411
+ domChatContact . textContent = profile ?. name || strOpenChat . substring ( 0 , 10 ) + '…' ;
1412
+ }
1409
1413
1410
1414
// Force wipe the 'Status' and it's styling
1411
- domChatContactStatus . textContent = '' ;
1412
- domChatContact . classList . add ( 'chat-contact' ) ;
1413
- domChatContact . classList . remove ( 'chat-contact-with-status ' ) ;
1415
+ domChatContactStatus . textContent = fNotes ? domChatContactStatus . textContent = 'Encrypted Notes to Self' : '' ;
1416
+ domChatContact . classList . add ( 'chat-contact-with-status ' ) ;
1417
+ domChatContact . classList . remove ( 'chat-contact' ) ;
1414
1418
}
1415
1419
1416
1420
adjustSize ( ) ;
0 commit comments