mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-12-17 06:44:21 +01:00
Work on Conversations UI
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user