Hide objects when layer is hidden

To keep the object list clear, it would be great if the objects of a hidden layer did not appear in the object list.

Thank you for your feedback. Right-click the layer, click ‘Select All Objects,’ then use the shortcut CTRL + G to group all objects and hide them. Would this help improve the issue?