Skip to content

Commit 49c879f

Browse files
committed
Fix a bug where the all packages widget would show a phantom package when no updates are found (fix Devolutions/UniGetUI#2862)
1 parent 6e9f1fb commit 49c879f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ Sign.lnk
1515
src/Package/Package.StoreAssociation.xml
1616
Widgets for UniGetUI Installer/
1717
Widgets for UniGetUI Installer.msix
18+
src/Package/Widgets-for-UniGetUI Package.assets.cache
0 Bytes
Binary file not shown.

src/Widgets/WingetUIConnector.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,11 @@ async public void GetAvailableUpdates(GenericWidget Widget, bool DeepCheck = fal
233233

234234
for (int i = 0; i < found_updates.Length; i++)
235235
{
236-
if (AllowedSource == "" || AllowedSource == found_updates[i].ManagerName)
236+
if ((AllowedSource == "" && found_updates[i].ManagerName != "") || (AllowedSource != "" && AllowedSource == found_updates[i].ManagerName))
237+
{
238+
Logger.Log($"\"{found_updates[i].ManagerName}\"");
237239
valid_updates[i - skippedPackages] = found_updates[i];
240+
}
238241
else
239242
skippedPackages++;
240243
}

0 commit comments

Comments
 (0)