mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 08:47:50 -06:00
Use meaningful variable name && some TODOs for later.
CURA-7090
This commit is contained in:
parent
e7ed93c132
commit
5c498de1e4
1 changed files with 6 additions and 6 deletions
|
@ -42,24 +42,24 @@ class CloudPackageChecker(QObject):
|
||||||
if self._application.getCuraAPI().account.isLoggedIn:
|
if self._application.getCuraAPI().account.isLoggedIn:
|
||||||
self._getUserPackages()
|
self._getUserPackages()
|
||||||
|
|
||||||
def _handleCompatibilityData(self, json_data: List[Dict[str, Any]]) -> None:
|
def _handleCompatibilityData(self, subscribed_packages_payload: List[Dict[str, Any]]) -> None:
|
||||||
user_subscribed_packages = [plugin["package_id"] for plugin in json_data]
|
user_subscribed_packages = [plugin["package_id"] for plugin in subscribed_packages_payload]
|
||||||
user_installed_packages = self._package_manager.getUserInstalledPackages()
|
user_installed_packages = self._package_manager.getUserInstalledPackages()
|
||||||
|
|
||||||
# We need to re-evaluate the dismissed packages
|
# We need to re-evaluate the dismissed packages
|
||||||
# (i.e. some package might got updated to the correct SDK version in the meantime,
|
# (i.e. some package might got updated to the correct SDK version in the meantime,
|
||||||
# hence remove them from the Dismissed Incompatible list)
|
# hence remove them from the Dismissed Incompatible list)
|
||||||
self._package_manager.reEvaluateDismissedPackages(json_data, self._sdk_version)
|
self._package_manager.reEvaluateDismissedPackages(subscribed_packages_payload, self._sdk_version)
|
||||||
user_dismissed_packages = self._package_manager.getDismissedPackages()
|
user_dismissed_packages = self._package_manager.getDismissedPackages()
|
||||||
if user_dismissed_packages:
|
if user_dismissed_packages:
|
||||||
user_installed_packages += user_dismissed_packages
|
user_installed_packages += user_dismissed_packages
|
||||||
# We check if there are packages installed in Cloud Marketplace but not in Cura marketplace
|
# We check if there are packages installed in Cloud Marketplace but not in Cura marketplace
|
||||||
package_discrepancy = list(set(user_subscribed_packages).difference(user_installed_packages))
|
package_discrepancy = list(set(user_subscribed_packages).difference(user_installed_packages))
|
||||||
|
|
||||||
self._model.addDiscrepancies(package_discrepancy)
|
self._model.addDiscrepancies(package_discrepancy) # TODO: Move these two lines below, under if package_discrepancy:
|
||||||
self._model.initialize(json_data)
|
self._model.initialize(subscribed_packages_payload)
|
||||||
|
|
||||||
if not self._model.hasCompatiblePackages:
|
if not self._model.hasCompatiblePackages: # TODO: Remove these two lines...
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if package_discrepancy:
|
if package_discrepancy:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue