Don't show page until fully loaded

This commit is contained in:
Andrew Miner
2016-04-28 22:38:04 -07:00
parent 2dbda99986
commit 636a8d061c
7 changed files with 63 additions and 14 deletions
+13 -6
View File
@@ -6,9 +6,10 @@
#
BaseModel = require '../base_model'
SimpleInventory = require '../crafting/simple_inventory'
Mod = require './mod'
ModVersionParser = require '../parsing/mod_version_parser'
Recipe = require './recipe'
SimpleInventory = require '../crafting/simple_inventory'
########################################################################################################################
@@ -165,12 +166,18 @@ module.exports = class ModPack extends BaseModel
# Private Methods ##############################################################################
_onModVersionLoaded: (modVersion)->
working = true
@eachMod (mod)->
mod.eachModVersion (modVersion)->
working = working and (modVersion.isUnloaded or modVersion.isLoading)
mods = @getAllMods()
return true unless mods.length > 0
return if working
for mod in mods
modVersions = mod.getAllModVersions()
return true unless modVersions.length > 0
continue if mod.activeVersion is Mod.Version.None
activeModVersion = mod.activeModVersion
return true unless activeModVersion?
return true if activeModVersion.isUnloaded
return true if activeModVersion.isLoading
@trigger c.event.change, this
@trigger c.event.sync, this