mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-24 14:46:42 +02:00
VimwikiTask: Refresh task when updating from TW only if forced to
This commit is contained in:
parent
e43c457d26
commit
3a3f466615
1 changed files with 8 additions and 2 deletions
|
@ -139,11 +139,17 @@ class VimwikiTask(object):
|
|||
if self.completed and (self.task.pending or self.task.waiting):
|
||||
self.task.done()
|
||||
|
||||
def update_from_tw(self):
|
||||
|
||||
def update_from_tw(self, refresh=False):
|
||||
if not self.task:
|
||||
return
|
||||
|
||||
self.task.refresh()
|
||||
# We refresh only if specified, since sometimes we
|
||||
# know that the TW task is up to date (e.g. because we just
|
||||
# loaded the object)
|
||||
if refresh:
|
||||
self.task.refresh()
|
||||
|
||||
self.text = self.task['description']
|
||||
# TODO: update due
|
||||
self.completed = (self.task['status'] == u'completed')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue