Show toast when downloading from cloud

This commit is contained in:
luboslenco
2022-12-13 10:57:31 +01:00
parent c3b5644223
commit 8b1fdbdd7e
+15 -3
View File
@@ -12,10 +12,22 @@ class ImportAsset {
public static function run(path: String, dropX = -1.0, dropY = -1.0, showBox = true, hdrAsEnvmap = true, done: Void->Void = null) { public static function run(path: String, dropX = -1.0, dropY = -1.0, showBox = true, hdrAsEnvmap = true, done: Void->Void = null) {
if (path.startsWith("cloud")) { if (path.startsWith("cloud")) {
File.cacheCloud(path, function(abs: String) { function doCacheCloud() {
if (abs == null) return; File.cacheCloud(path, function(abs: String) {
run(abs, dropX, dropY, showBox, hdrAsEnvmap, done); if (abs == null) return;
run(abs, dropX, dropY, showBox, hdrAsEnvmap, done);
});
}
#if (krom_android || krom_ios)
arm.App.notifyOnNextFrame(function() {
Console.toast(tr("Downloading"));
arm.App.notifyOnNextFrame(doCacheCloud);
}); });
#else
doCacheCloud();
#end
return; return;
} }