carlw
12/12/2017, 7:01 PMron
12/12/2017, 7:01 PMron
12/12/2017, 7:02 PMron
12/12/2017, 7:02 PMron
12/12/2017, 7:03 PMron
12/12/2017, 7:03 PMamanda.hinchman-dominguez
12/12/2017, 7:05 PMamanda.hinchman-dominguez
12/12/2017, 7:05 PMamanda.hinchman-dominguez
12/12/2017, 7:06 PMamanda.hinchman-dominguez
12/12/2017, 7:07 PMedvin
12/12/2017, 7:10 PMron
12/12/2017, 7:10 PMedvin
12/12/2017, 7:12 PMedvin
12/12/2017, 7:13 PMedvin
12/12/2017, 7:14 PMif (node != grid && db.hasContent(TILES) && db.getContent(TILES) is DragTile)
if you want to make sureCarlton Whitehead
12/12/2017, 7:14 PMamanda.hinchman-dominguez
12/12/2017, 7:16 PMron
12/12/2017, 7:17 PMedvin
12/12/2017, 7:18 PM(db.getContent(TILES) as? DragTile)?.let{}
. The code in let will only run if you have a DragTile (will be passed as a parameter to the function)ron
12/12/2017, 7:19 PMron
12/12/2017, 7:19 PMedvin
12/12/2017, 7:22 PMamanda.hinchman-dominguez
12/12/2017, 7:26 PMamanda.hinchman-dominguez
12/12/2017, 7:27 PMedvin
12/12/2017, 7:27 PMrunAsync
one more time instead.amanda.hinchman-dominguez
12/12/2017, 7:28 PMedvin
12/12/2017, 7:28 PMedvin
12/12/2017, 7:30 PMrunAsync
returns, the setOnSucceeded
call we attach will never run. We might be able to inspect the status of the task and run the code immediately if the task is completed. The task has observable properties, so if we inspect them on the ui thread that might solve it.