diff --git a/quick_simplenote.py b/quick_simplenote.py index a78bec6..bd4f460 100644 --- a/quick_simplenote.py +++ b/quick_simplenote.py @@ -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: @@ -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