Dvlv / BoxBuddyRS

A Graphical Interface for Distrobox
MIT License
210 stars 21 forks source link

Minor refactor for volumes #60

Closed VortexAcherontic closed 5 months ago

VortexAcherontic commented 5 months ago

Hey there, this is just a very very small PR but a sting in my eye since I added this feature 😆

Before BoxBuddy iterated over the ListBox containing all volumes simply by removing the last row until no row was present any more. This could be observed by the user while looking at all those little volume entries to disappear one by one.

The refactored code now works a little different. It simply fetches the first row at index 0. If it is None it will continue as no volumes has been set. If it is not None it then does the usual unwrap and downcast to get the actual volume host and volume guest paths. Then it will recursively fetch the following rows and do the same. Until None is received. At that point all rows have been iterated and added to the volume vec.

This fixes the dissolving volume entry rows.

Kind regards, V.

Dvlv commented 5 months ago

Thanks!