HaikuDepot: Set package state when loading single package
Without this, even installed packages still get an "Install" button. Fixes #14821. This was implemented by adding BPackageRoster::IsPackageActive. I decided to have this take a location since GetActivePackages also did, but as noted in my TODO comment, I think this is awkward. It would also be nice to show the user they have a different version of a particular package, but that would require some changes to IsPackageActive. Change-Id: Iab0d35eb6b671a17711b0214b15164d296927e5a Reviewed-on: https://review.haiku-os.org/c/1694 Reviewed-by: Stephan Aßmus <[email protected]>
This commit is contained in:
committed by
Stephan Aßmus
parent
925c3a133b
commit
b711002d34
@@ -32,6 +32,7 @@ class BInstallationLocationInfo;
|
||||
class BPackageInfoSet;
|
||||
class BRepositoryCache;
|
||||
class BRepositoryConfig;
|
||||
class BPackageInfo;
|
||||
|
||||
|
||||
// watchable events
|
||||
@@ -87,6 +88,10 @@ public:
|
||||
BPackageInstallationLocation location,
|
||||
BPackageInfoSet& packageInfos);
|
||||
|
||||
status_t IsPackageActive(
|
||||
BPackageInstallationLocation location,
|
||||
const BPackageInfo info, bool* active);
|
||||
|
||||
status_t StartWatching(const BMessenger& target,
|
||||
uint32 eventMask);
|
||||
status_t StopWatching(const BMessenger& target);
|
||||
|
||||
Reference in New Issue
Block a user