This commit is contained in:
@@ -54,22 +54,16 @@ var catched_errors_vbox: VBoxContainer = %CatchedErrorsVBox
|
||||
@onready
|
||||
var sync_time: Label = %SyncTime
|
||||
|
||||
@onready
|
||||
var cool_down_timer: Timer = %CoolDownTimer
|
||||
|
||||
@onready
|
||||
var sync_timer: Timer = %SyncTimer
|
||||
|
||||
var changes: bool = false
|
||||
|
||||
var cool_down_ongoing: bool = false
|
||||
|
||||
signal sync_started
|
||||
signal sync_finished
|
||||
|
||||
func _ready() -> void:
|
||||
sync_timer.timeout.connect(_on_sync_timeout)
|
||||
cool_down_timer.timeout.connect(_on_cool_down_timeout)
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if self.visible == true:
|
||||
@@ -86,14 +80,9 @@ func start_sync() -> void:
|
||||
Settings.currently_syncing = true
|
||||
sync_started.emit()
|
||||
show_sync_progress()
|
||||
if !cool_down_ongoing && !Settings.currently_syncing:
|
||||
if !Settings.currently_syncing:
|
||||
Settings.make_request2("/sync", sync_request_sent, false)
|
||||
|
||||
func _on_cool_down_timeout() -> void:
|
||||
print("_on_cool_down_timeout")
|
||||
print("COOLDOWN IS NOW FINSISHED, SYNC CAN START AGAIN")
|
||||
cool_down_ongoing = false
|
||||
|
||||
func _on_sync_timeout() -> void:
|
||||
print("_on_sync_timeout!")
|
||||
var get_progress: Callable = func get_progress(data_received: Dictionary) -> void:
|
||||
@@ -146,8 +135,6 @@ func on_sync_finished(data_received: Dictionary) -> void:
|
||||
sync_timer.stop()
|
||||
print("sync finished")
|
||||
show_sync_result()
|
||||
cool_down_timer.start(30*60)
|
||||
cool_down_ongoing = true
|
||||
sync_finished.emit()
|
||||
|
||||
func list_visible(vbox: VBoxContainer, seperator: VSeparator) -> void:
|
||||
|
||||
Reference in New Issue
Block a user