Reported 2026-11-05: those two tabs stayed open when clicking elsewhere, unlike Stream Settings, YPP and TEST. All five drawers share one host (TextPullOutHost), but the window's click-outside guard only listed the other three, so the gear and socials panels had no way to dismiss except their own tab. The guard now closes them too, and a test pins both directions: an outside click retracts the drawer, and a click inside it does not.
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
namespace ytLive.ViewModels;
|
|
|
|
/// <summary>
|
|
/// App Settings as a right-edge drawer (creator ruling 2026-11-01): the gear rail tab opens it
|
|
/// immediately, in the same exclusive-slide pattern as Stream Settings / YPP / Socials / TEST.
|
|
///
|
|
/// <para>It is a separate flag from <see cref="IsSettingsOpen"/> because the overlay shell now
|
|
/// only carries Report Bug / Feature Request / About — settings stopped being a modal.</para>
|
|
/// </summary>
|
|
public partial class MainViewModel
|
|
{
|
|
private bool _settingsDrawerOpen;
|
|
|
|
public bool SettingsDrawerOpen
|
|
{
|
|
get => _settingsDrawerOpen;
|
|
private set => SetProperty(ref _settingsDrawerOpen, value);
|
|
}
|
|
|
|
internal void ToggleSettingsDrawer()
|
|
{
|
|
if (_settingsDrawerOpen)
|
|
{
|
|
SettingsDrawerOpen = false;
|
|
return;
|
|
}
|
|
|
|
// One drawer at a time, like the rail's other tabs.
|
|
BroadcastForm.IsDrawerOpen = false;
|
|
Ypp.IsDrawerOpen = false;
|
|
TestSession.IsDrawerOpen = false;
|
|
if (SocialsDrawerOpen) CloseSocialsDrawer();
|
|
|
|
SettingsDrawerOpen = true;
|
|
}
|
|
|
|
/// <summary>Called by the other drawers when they open, so settings yields to them — and by the
|
|
/// window's click-outside guard, so the gear tab retracts like every other drawer (2026-11-05).</summary>
|
|
internal void CloseSettingsDrawerIfOpen()
|
|
{
|
|
if (_settingsDrawerOpen) SettingsDrawerOpen = false;
|
|
}
|
|
}
|