When you receive a message in a chat from the other device, and the chat's window is not frontmost, Underpass keeps a count of unread messages. The total count of all unread messages for all chats is added to the title of the main Chats window.
When you display the main Chats window, the number of unread messages for each chat is displayed next to the chat's name.
After you open the window for a chat with unread messages, the unread count for that chat is cleared.
Underpass does not use iOS system notifications because iOS does not provide network data to Underpass while the app is in the background. In other words, Underpass will not receive messages from other devices while Underpass is not the active app, although those messages will be delivered when you make Underpass active again. This background behavior is a limitation of iOS. Since Underpass is peer-to-peer, it establishes a direct network connection from one device to the other. Other apps that provide background notifications do so via Apple's push notification service, but that would violate the privacy of your chat. Underpass is designed for complete privacy, so it abstains from using Apple push notifications or any other third party service.
It is safe to send Underpass to the background while you are chatting, because Underpass does not disconnect your active chats while in the background. Thus you are able to switch to another app to copy a file or image, for example. You just won't see any new messages while Underpass is in the background.