mirror of
https://github.com/lubuntu-team/lugito.git
synced 2025-05-01 21:11:28 +00:00
Move the task creation detection code above the comment detection code, and don't run the latter if the former is true.
This commit is contained in:
parent
643cec641d
commit
263d4ec192
28
lugito
28
lugito
@ -84,9 +84,23 @@ def main():
|
|||||||
taskexists = False
|
taskexists = False
|
||||||
|
|
||||||
if taskexists:
|
if taskexists:
|
||||||
|
# First, let's see if it's a new task
|
||||||
|
newcomment = False
|
||||||
|
epoch = False
|
||||||
|
for task in tasksearch:
|
||||||
|
if epoch:
|
||||||
|
if task["dateCreated"] == task["dateModified"] and task["dateCreated"] == epoch:
|
||||||
|
newcomment = True
|
||||||
|
else:
|
||||||
|
newcomment = False
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
epoch = task["dateCreated"]
|
||||||
|
|
||||||
|
# If it's not a new task, let's see if it's a comment, and if it's just an edit
|
||||||
|
if not newcomment:
|
||||||
commentid = None
|
commentid = None
|
||||||
edited = False
|
edited = False
|
||||||
# Let's see if this was a comment and if it's just an edit
|
|
||||||
for task in tasksearch:
|
for task in tasksearch:
|
||||||
dataepoch = data["action"]["epoch"]
|
dataepoch = data["action"]["epoch"]
|
||||||
datemodified = task["dateModified"]
|
datemodified = task["dateModified"]
|
||||||
@ -101,18 +115,6 @@ def main():
|
|||||||
else:
|
else:
|
||||||
comment = False
|
comment = False
|
||||||
|
|
||||||
newcomment = False
|
|
||||||
epoch = False
|
|
||||||
if not comment and not edited:
|
|
||||||
for task in tasksearch:
|
|
||||||
if epoch:
|
|
||||||
if task["dateCreated"] == task["dateModified"] and task["dateCreated"] == epoch:
|
|
||||||
newcomment = True
|
|
||||||
else:
|
|
||||||
newcomment = False
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
epoch = task["dateCreated"]
|
|
||||||
|
|
||||||
# We should also know who did this thing
|
# We should also know who did this thing
|
||||||
userlookup = tasksearch[0]["authorPHID"]
|
userlookup = tasksearch[0]["authorPHID"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user