MCPcopy Create free account
hub / github.com/benkuper/Chataigne / updateLocalData

Method updateLocalData

Source/Module/Community/CommunityModuleInfo.cpp:64–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void CommunityModuleInfo::updateLocalData()
65{
66 var localData = ModuleManager::getInstance()->factory->getCustomModuleInfo(niceName);
67
68 localVersion = localData.getProperty("version", "Unknown");
69 localModuleFolder = ModuleManager::getInstance()->factory->getFolderForCustomModule(niceName);
70
71 if (localData.isVoid())
72 {
73 status = NOT_INSTALLED;
74 }
75 else
76 {
77 if (onlineVersion > localVersion)
78 {
79 status = NEW_VERSION_AVAILABLE;
80 }
81 else if (onlineVersion == localVersion)
82 {
83 status = UP_TO_DATE;
84 }
85 else
86 {
87 status = INSTALLED;
88 }
89
90 ModuleManager::getInstance()->factory->setModuleNewVersionAvailable(niceName, status == NEW_VERSION_AVAILABLE);
91 }
92
93 installTriger->setEnabled(status != UP_TO_DATE);
94 isLocal->setValue(status != NOT_INSTALLED);
95}
96
97void CommunityModuleInfo::onContainerTriggerTriggered(Trigger* t)
98{

Callers 1

Calls 4

getCustomModuleInfoMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected