change refresh to use new worker stuff

This commit is contained in:
servertood
2008-11-22 05:09:11 +00:00
parent a4cebeb641
commit eba2899564
2 changed files with 4 additions and 24 deletions

View File

@@ -42,18 +42,8 @@ else if ("Refresh" == who)
if ( script.endsWith("Worker") )
{
Worker w = worker(script, scriptArgs, Worker.RunOption.LET_FINISH_IF_RUNNING);
Runnable preloadIfLazy = scriptArgs.getObject("preloadIfLazy");
if (preloadIfLazy != null )
{
//they hit refresh in quick succession
if ( w.isCancelled() )
{
preloadIfLazy.run();
return;
}
}
scriptArgs.put("worker", w);
LongRunningTask.detect("progressWaiter",scriptArgs, w , 250);
if (!w.isCancelled())
LongRunningTask.detect("progressWaiter",scriptArgs, w , 250);
}
else
{

View File

@@ -43,18 +43,8 @@ else if ("Refresh" == who)
if ( script.endsWith("Worker") )
{
Worker w = worker(script, scriptArgs, Worker.RunOption.LET_FINISH_IF_RUNNING);
Runnable preloadIfLazy = scriptArgs.getObject("preloadIfLazy");
if (preloadIfLazy != null )
{
//they hit refresh in quick succession
if ( w.isCancelled() )
{
preloadIfLazy.run();
return;
}
}
scriptArgs.put("worker", w);
LongRunningTask.detect("progressWaiter",scriptArgs, w , 250);
if (!w.isCancelled())
LongRunningTask.detect("progressWaiter",scriptArgs, w , 250);
}
else
{