From 67b024e12810b60f39cfeddf035ebf4706632e9a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 1 Dec 2020 10:12:25 +0000 Subject: [PATCH] Less indentation --- webapp_post.py | 66 ++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index c3bf9b15..54839a42 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -314,44 +314,46 @@ def getEditIconHtml(baseDir: str, nickname: str, domainFull: str, postId = postJsonObject['object']['id'] - if '/statuses/' in postId: - if isBlogPost(postJsonObject): - editBlogPostStr = translate['Edit blog post'] - if not isNewsPost(postJsonObject): - editStr += \ - ' ' + \ - '' + \ - '' + editBlogPostStr + \
-                        ' |\n' - else: - editStr += \ - ' ' + \ - '' + \ - '' + editBlogPostStr + \
-                        ' |\n' - elif isEvent: - editEventStr = translate['Edit event'] + if '/statuses/' not in postId: + return editStr + + if isBlogPost(postJsonObject): + editBlogPostStr = translate['Edit blog post'] + if not isNewsPost(postJsonObject): editStr += \ ' ' + \ - '' + \ + '" title="' + editBlogPostStr + '">' + \ '' + editEventStr + \
+                    editBlogPostStr + '\n' + else: + editStr += \ + ' ' + \ + '' + \ + '' + editBlogPostStr + \
+                    ' |\n' + elif isEvent: + editEventStr = translate['Edit event'] + editStr += \ + ' ' + \ + '' + \ + '' + editEventStr + \
+                ' |\n' return editStr