Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue that exiting to lobby with backspace in shop #971

Merged
merged 1 commit into from
Nov 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions nekoyume/Assets/_Scripts/UI/Widget/ShopBuy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,8 @@ protected override void Awake()
closeButton.onClick.AddListener(() =>
{
CleanUpWishListAlertPopup(Close);
Game.Event.OnRoomEnter.Invoke(true);
});
CloseWidget = () =>
{
Close();
Game.Event.OnRoomEnter.Invoke(true);
};
CloseWidget = () => CleanUpWishListAlertPopup(Close);
}

public override void Initialize()
Expand Down Expand Up @@ -145,6 +140,7 @@ private void Close()
_npc?.gameObject.SetActive(false);
shopItems.Close();
Find<ItemCountAndPricePopup>().Close();
Game.Event.OnRoomEnter.Invoke(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. If don't invoke OnRoomEnter, screen will get blackout after closing this widget.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, OnRoomEnter was separated from Close, but I put it inside Close because I thought it was meaningless.

Close(true);
}

Expand Down