mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-05-17 21:30:25 -04:00
Added new message indicator.
This commit is contained in:
parent
675946e2b7
commit
903c75db0f
4 changed files with 72 additions and 1 deletions
|
@ -205,6 +205,18 @@ class NomadNetworkApp:
|
|||
def conversations(self):
|
||||
return nomadnet.Conversation.conversation_list(self)
|
||||
|
||||
def conversation_is_unread(self, source_hash):
|
||||
if bytes.fromhex(source_hash) in nomadnet.Conversation.unread_conversations:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def mark_conversation_read(self, source_hash):
|
||||
if bytes.fromhex(source_hash) in nomadnet.Conversation.unread_conversations:
|
||||
nomadnet.Conversation.unread_conversations.pop(bytes.fromhex(source_hash))
|
||||
if os.path.isfile(self.conversationpath + "/" + source_hash + "/unread"):
|
||||
os.unlink(self.conversationpath + "/" + source_hash + "/unread")
|
||||
|
||||
def createDefaultConfig(self):
|
||||
self.config = ConfigObj(__default_nomadnet_config__)
|
||||
self.config.filename = self.configpath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue