Issue #3356093 by claudiu.cristea: Code duplication in MediaLibraryUiBuilder::buildMediaLibraryView()