mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
rename activity callback
This commit is contained in:
parent
8af3b53937
commit
77c2041ad3
@ -386,7 +386,7 @@ def is_view_active(view):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def handle_heartbeat(view, is_write=False):
|
def handle_activity(view, is_write=False):
|
||||||
window = view.window()
|
window = view.window()
|
||||||
if window is not None:
|
if window is not None:
|
||||||
entity = view.file_name()
|
entity = view.file_name()
|
||||||
@ -625,15 +625,15 @@ if ST_VERSION < 3000:
|
|||||||
class WakatimeListener(sublime_plugin.EventListener):
|
class WakatimeListener(sublime_plugin.EventListener):
|
||||||
|
|
||||||
def on_post_save(self, view):
|
def on_post_save(self, view):
|
||||||
handle_heartbeat(view, is_write=True)
|
handle_activity(view, is_write=True)
|
||||||
|
|
||||||
def on_selection_modified(self, view):
|
def on_selection_modified(self, view):
|
||||||
if is_view_active(view):
|
if is_view_active(view):
|
||||||
handle_heartbeat(view)
|
handle_activity(view)
|
||||||
|
|
||||||
def on_modified(self, view):
|
def on_modified(self, view):
|
||||||
if is_view_active(view):
|
if is_view_active(view):
|
||||||
handle_heartbeat(view)
|
handle_activity(view)
|
||||||
|
|
||||||
|
|
||||||
class WakatimeDashboardCommand(sublime_plugin.ApplicationCommand):
|
class WakatimeDashboardCommand(sublime_plugin.ApplicationCommand):
|
||||||
|
Loading…
Reference in New Issue
Block a user