diff --git a/src/NuGetForUnity/Editor/Ui/NugetWindow.cs b/src/NuGetForUnity/Editor/Ui/NugetWindow.cs index bb1e953a..d57feaea 100644 --- a/src/NuGetForUnity/Editor/Ui/NugetWindow.cs +++ b/src/NuGetForUnity/Editor/Ui/NugetWindow.cs @@ -708,26 +708,6 @@ private void DrawPackages(IEnumerable packages, bool canBeSelecte } } - private void DrawShowPrereleaseButton() - { - var showPrereleaseTemp = GUILayout.Toggle(showOnlinePrerelease, ShowPrereleaseContent, EditorStyles.toolbarButton, GUILayout.Width(130f)); - if (showPrereleaseTemp != showOnlinePrerelease) - { - showOnlinePrerelease = showPrereleaseTemp; - UpdateOnlinePackages(); - } - } - - private void DrawShowDowngradesButton() - { - var showDowngradesTemp = GUILayout.Toggle(showDowngrades, ShowDowngradesContent, EditorStyles.toolbarButton, GUILayout.Width(130f)); - if (showDowngradesTemp != showDowngrades) - { - versionDropdownDataPerPackage.Clear(); - showDowngrades = showDowngradesTemp; - } - } - /// /// Draws the header which allows filtering the online list of packages. /// @@ -737,7 +717,13 @@ private void DrawOnlineHeader() { EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); { - DrawShowPrereleaseButton(); + var showPrereleaseTemp = GUILayout.Toggle(showOnlinePrerelease, ShowPrereleaseContent, EditorStyles.toolbarButton, GUILayout.Width(130f)); + if (showPrereleaseTemp != showOnlinePrerelease) + { + showOnlinePrerelease = showPrereleaseTemp; + UpdateOnlinePackages(); + } + GUILayout.FlexibleSpace(); DrawSelectFromClipboardButton(); DrawMandatoryButtons(); @@ -883,8 +869,19 @@ private void DrawUpdatesHeader() { EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); { - DrawShowPrereleaseButton(); - DrawShowDowngradesButton(); + var showPrereleaseTemp = GUILayout.Toggle(showPrereleaseUpdates, ShowPrereleaseContent, EditorStyles.toolbarButton, GUILayout.Width(130f)); + if (showPrereleaseTemp != showPrereleaseUpdates) + { + showPrereleaseUpdates = showPrereleaseTemp; + UpdateUpdatePackages(); + } + + var showDowngradesTemp = GUILayout.Toggle(showDowngrades, ShowDowngradesContent, EditorStyles.toolbarButton, GUILayout.Width(130f)); + if (showDowngradesTemp != showDowngrades) + { + versionDropdownDataPerPackage.Clear(); + showDowngrades = showDowngradesTemp; + } GUILayout.FlexibleSpace();