From d4ddf6bb13d4d002e958d636908f1519271342ef Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 5 May 2026 21:19:16 +0200 Subject: [PATCH] Improved workdoc sorting --- RNS/Utilities/rngit/pages.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RNS/Utilities/rngit/pages.py b/RNS/Utilities/rngit/pages.py index 44c7ab66..7b51d78d 100644 --- a/RNS/Utilities/rngit/pages.py +++ b/RNS/Utilities/rngit/pages.py @@ -1349,12 +1349,12 @@ class NomadNetworkNode(): comment_count = len([f for f in os.listdir(doc_dir) if f.isdigit() and os.path.isfile(os.path.join(doc_dir, f))]) docs.append({ "id": doc_id, "title": meta.get("title", "Untitled"), - "created": meta.get("created", 0), "author": meta.get("author", b""), - "comments": comment_count }) + "created": meta.get("created", 0), "edited": meta.get("edited", 0), + "author": meta.get("author", b""), "comments": comment_count }) except: continue - docs.sort(key=lambda x: x["created"], reverse=True) + docs.sort(key=lambda x: max(x["created"], x["edited"]), reverse=True) if not docs: content_parts.append(self.m_heading(f"{s.capitalize()} ({len(docs)})", 2)+f"\n`*No {s} work documents`*\n")