Opened 10 years ago
Closed 9 years ago
#11886 closed enhancement (fixed)
HaikuDepot's contents tab should live-update
Reported by: | humdinger | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/HaikuDepot | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is hrev48848.
HaikuDepot's "Contents" tab can only show a package's contents after it's been downloaded/installed. But currently, if I click the "Install" button, I still have to restart HaikuDepot for the "Contents" tab to show the contents. Would be nice if the tab's view could be informed that the contents is now available for displaying.
Attachments (2)
Change History (9)
by , 9 years ago
Attachment: | 0001-HaikuDepot-Update-content-tab-when-package-is-instal.patch added |
---|
comment:1 by , 9 years ago
patch: | 0 → 1 |
---|
comment:2 by , 9 years ago
The attached patch updates the contents tab each time the status of the attached package changes.
comment:3 by , 9 years ago
Thanks for your work / the patch! I faintly remember that checking and preventing the same package to be rescanned in PackageContentsView
was done for performance reasons. Are you sure there is no performance regression now in certain use-cases? To make sure this cannot be the case, one could move code from SetPackage()
into a separate public method (maybe ScanPackage()
?) and then call that method directly when the package status changes.
comment:4 by , 9 years ago
Good idea. I will look into that as soon as I am home. Another option would be to reintroduce the check I removed but only return
if the package is already known and its state has not changed since it was last scanned.
comment:6 by , 9 years ago
I believe that the fPackage == package
check was there to circumvent a bug in PackageContentsView: fContentsView->MakeEmpty()
is called outside the populator thread, so when SetPackage is called twice in a row for the same package in very quick succession, MakeEmpty
is called twice and then the populator runs twice. Those quick successive calls seem to occur rather frequently in HaikuDepot, so with the check removed, you would sometimes see the "Package contents not available for remote packages" message twice in the content tab. Now, with the check reinstantiated, the bug does not occur any more, but I still suggest calling MakeEmpty
again in either _ContentPopulatorThread
or _PopulatePackageContents
.
by , 9 years ago
Attachment: | 0001-HaikuDepot-Update-the-content-tab-when-the-state-of-.patch added |
---|
Improved version of the proposed patch
comment:7 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Somehow the patch did not apply anymore, and I noticed that there were no checks for packageRef.Get() != NULL. So I quickly re-implemented it based on your patch. Thanks! Fixed in hrev49557.
Proposed patch