Skip to content

Commit

Permalink
Tracking sync problem
Browse files Browse the repository at this point in the history
  • Loading branch information
scbtest committed May 4, 2014
1 parent 3e391c9 commit 1003c00
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions quick_simplenote.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,21 +453,9 @@ def run(self):
deletion_op.set_callback(self.handle_deletion)
OperationManager().add_operation(deletion_op)

def reload_if_needed():
global settings, started, reload_calls

# Sublime calls this twice for some reason :(
reload_calls = reload_calls + 1
if (reload_calls % 2 != 0):
return

if settings.get('autostart'):
sublime.set_timeout(start, 2000) # I know...
print('QuickSimplenote: Autostarting')

def sync():
if not OperationManager().is_running():
print('QuickSimplenote: Syncing')
print('QuickSimplenote: Syncing: %s' % time.time())
sublime.run_command('start_quick_simplenote_sync');
sync_every = settings.get('sync_every')
if sync_every > 0:
Expand All @@ -492,6 +480,18 @@ def start():

return started

def reload_if_needed():
global settings, started, reload_calls

# Sublime calls this twice for some reason :(
reload_calls = reload_calls + 1
if (reload_calls % 2 != 0):
return

if settings.get('autostart'):
sublime.set_timeout(start, 2000) # I know...
print('QuickSimplenote: Autostarting')

reload_calls = -1
simplenote_instance = None
started = False
Expand Down

0 comments on commit 1003c00

Please sign in to comment.