fix(ui): remove straight away when there is a single installation
The chooser answered an empty list when the provider held one copy, and the caller read that as "nothing was ticked" — so Supprimer on a package installed once showed "Aucune installation sélectionnée." and removed nothing, which is most packages. The row is now removed directly unless there is something to choose between, and the message about ticking nothing only appears where it can happen: after the chooser.
This commit is contained in:
2 files changed
+17
-12
No files matched your search
+3
-3
@@ -51,9 +51,9 @@ private:
|
||||
void populateTable(const std::vector<PackageInfo>& packages);
|
||||
void appendRows(const std::vector<PackageInfo>& packages);
|
||||
void addRow(int row, const PackageInfo& pkg);
|
||||
// Which installations of the selected package to remove, when the provider
|
||||
// holds it more than once. Empty when there is only one to remove, nothing
|
||||
// (std::nullopt) when the user cancels the chooser.
|
||||
// Which installations of the selected package to remove, asked only when
|
||||
// the provider holds it more than once. Nothing (std::nullopt) when the
|
||||
// user cancels, an empty list when they tick nothing.
|
||||
std::optional<std::vector<std::string>> chooseInstancesToRemove();
|
||||
void updateDetails(const PackageInfo& pkg);
|
||||
void resetDetails();
|
||||
|
||||
Reference in new issue
Block a user