@@ -187,7 +187,6 @@ Dash <- R6::R6Class(
187
187
private $ app_root_path <- getAppPath()
188
188
private $ app_launchtime <- as.integer(Sys.time())
189
189
private $ meta_tags <- meta_tags
190
- private $ has_reloaded <- FALSE
191
190
private $ in_viewer <- FALSE
192
191
193
192
# config options
@@ -721,15 +720,7 @@ Dash <- R6::R6Class(
721
720
# private$last_cycle will be set when the cycle-end handler terminates
722
721
#
723
722
if (! is.null(private $ last_cycle ) & ! is.null(hot_reload_watch_interval )) {
724
- if (! private $ has_reloaded )
725
- # allow reloading on first change, then compare against the hot_reload_watch_interval
726
- # to control whether future reloads are permitted on cycle end
727
- permit_reload <- TRUE
728
- else {
729
- # determine if the time since last reload end is equal to or longer than the requested check interval
730
- # (Sys.time() - private$last_reload) provides time in seconds, same units as hot_reload_watch_interval
731
- permit_reload <- (Sys.time() - private $ last_reload ) > = hot_reload_watch_interval
732
- }
723
+ permit_reload <- (Sys.time() - private $ last_reload ) > = hot_reload_watch_interval
733
724
} else {
734
725
permit_reload <- FALSE
735
726
}
@@ -820,7 +811,6 @@ Dash <- R6::R6Class(
820
811
rstudioapi :: viewer(paste0(" http://" , self $ server $ host , " :" , self $ server $ port ))
821
812
# tear down the temporary environment
822
813
rm(app_env )
823
- private $ has_reloaded <- TRUE
824
814
}
825
815
}
826
816
}
@@ -867,11 +857,10 @@ Dash <- R6::R6Class(
867
857
app_root_modtime = NULL ,
868
858
869
859
# fields for controlling hot reloading state
870
- last_reload = NULL ,
860
+ last_reload = numeric ( 1 ) ,
871
861
last_refresh = NULL ,
872
862
last_cycle = NULL ,
873
863
modified_since_reload = NULL ,
874
- has_reloaded = NULL ,
875
864
876
865
# field to store whether viewer has been requested
877
866
in_viewer = NULL ,
0 commit comments