Fix ghost item when trade gets declined

This commit is contained in:
threadexception 2022-01-18 14:15:18 +01:00
parent 37c14037cb
commit 2a65d4950d
2 changed files with 4 additions and 0 deletions

View File

@ -4055,6 +4055,9 @@ impl Hud {
events
}
#[inline]
pub fn clear_cursor(&mut self) { self.slot_manager.idle(); }
pub fn render<'a>(&'a self, drawer: &mut UiDrawer<'_, 'a>) {
span!(_guard, "render", "Hud::render");
// Don't show anything if the UI is toggled off.

View File

@ -223,6 +223,7 @@ impl SessionState {
self.hud.new_message(ChatType::Meta.chat_msg(msg));
},
client::Event::TradeComplete { result, trade: _ } => {
self.hud.clear_cursor();
let i18n = global_state.i18n.read();
let msg = match result {
TradeResult::Completed => i18n.get("hud.trade.result.completed"),