mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-05-10 01:54:57 -04:00
Work on Conversations UI
This commit is contained in:
parent
f5d263ee31
commit
0c1108f00e
4 changed files with 57 additions and 12 deletions
|
@ -13,5 +13,28 @@ class Conversation:
|
|||
|
||||
lxmessage.write_to_directory(conversation_path)
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
@staticmethod
|
||||
def conversation_list(app):
|
||||
conversations = []
|
||||
for entry in os.listdir(app.conversationpath):
|
||||
if os.path.isdir(app.conversationpath + "/" + entry):
|
||||
try:
|
||||
conversations.append(Conversation(entry, app))
|
||||
except Exception as e:
|
||||
RNS.log("Error while loading conversation "+str(entry)+", skipping it. The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||
|
||||
return conversations
|
||||
|
||||
|
||||
|
||||
def __init__(self, source_hash, app):
|
||||
self.source_hash = source_hash
|
||||
self.message_path = app.conversationpath + "/" + source_hash
|
||||
self.messages_load_time = None
|
||||
self.messages = []
|
||||
self.source_known = False
|
||||
self.source_trusted = False
|
||||
self.source_blocked = False
|
||||
|
||||
def __str__(self):
|
||||
return self.source_hash
|
Loading…
Add table
Add a link
Reference in a new issue