撤销之前关于列表为空时不呼出侧边栏的改动,因为搜索列表也可能为空,导致无法呼出侧边栏,就无法取消搜索

现在保证侧边栏呼出时,判断当前选中rom是否为空
This commit is contained in:
ALIENJACK\alien 2025-01-24 16:30:19 +08:00
parent 9abbce930f
commit 36f0822244

View File

@ -60,9 +60,6 @@ namespace AxibugEmuOnline.Client
protected override void OnCmdOptionMenu()
{
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
if (thirdMenuGroup.itemGroup.DataList == null || thirdMenuGroup.itemGroup.DataList.Count == 0) return;
OverlayManager.PopSideBar(m_options);
}
@ -114,9 +111,9 @@ namespace AxibugEmuOnline.Client
private RomItem m_currentSelect => m_romListSub.GetItemUIByIndex(m_romListSub.SelectIndex) as RomItem;
public override bool Visible => m_currentSelect.RomInfoReady;
public override bool Visible => m_currentSelect != null && m_currentSelect.RomInfoReady;
public override string Name { get { return m_currentSelect.IsStar ? "取消收藏" : "收藏"; } }
public override string Name { get { return m_currentSelect != null && m_currentSelect.IsStar ? "取消收藏" : "收藏"; } }
public OptMenu_Fav(RomListMenuItem romListUI)
{