mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 23:29:07 +08:00
Fix a bug where a package sync dialog would incorrectly not be shown
1. user subscribes to a package 2. dismisses the license/unsubscribes 3. subscribes to the same packafe again in this scenario we want to notify the user again after step 3. This was not the case because situations in step 1 and 3 are equal and thus the user was considered notified. CURA-7473
This commit is contained in:
parent
294afdb7ca
commit
c815b098d4
@ -106,6 +106,16 @@ class CloudPackageChecker(QObject):
|
||||
# We check if there are packages installed in Web Marketplace but not in Cura marketplace
|
||||
package_discrepancy = list(user_subscribed_packages.difference(user_installed_packages))
|
||||
|
||||
if user_subscribed_packages != self._last_notified_packages:
|
||||
# scenario:
|
||||
# 1. user subscribes to a package
|
||||
# 2. dismisses the license/unsubscribes
|
||||
# 3. subscribes to the same packafe again
|
||||
# in this scenario we want to notify the user again. To capture that there was a change during
|
||||
# step 2, we clear the last_notified after step 2. This way, the user will be notified after
|
||||
# step 3 even though the list of packages for step 1 and 3 are equal
|
||||
self._last_notified_packages = None
|
||||
|
||||
if package_discrepancy:
|
||||
account = self._application.getCuraAPI().account
|
||||
account.setUpdatePackagesAction(lambda: self._onSyncButtonClicked(None, None))
|
||||
|
Loading…
x
Reference in New Issue
Block a user