fix gamelist diff bugs
This commit is contained in:
parent
6546dabb93
commit
76e287f954
2 changed files with 8 additions and 2 deletions
|
@ -151,6 +151,7 @@ ui::ui(display& disp, const std::string& title, const config& cfg, chat& c, conf
|
|||
gui::widget(disp.video()),
|
||||
disp_(disp),
|
||||
initialized_(false),
|
||||
gamelist_initialized_(false),
|
||||
|
||||
hotkey_handler_(&disp),
|
||||
disp_manager_(&disp),
|
||||
|
@ -320,11 +321,15 @@ void ui::process_network_data(const config& data, const network::connection sock
|
|||
}
|
||||
|
||||
if(data.child("gamelist")) {
|
||||
if(!gamelist_initialized_)
|
||||
gamelist_initialized_ = true;
|
||||
gamelist_ = data;
|
||||
gamelist_updated(false);
|
||||
} else if(data.child("gamelist_diff")) {
|
||||
gamelist_.apply_diff(*data.child("gamelist_diff"));
|
||||
gamelist_updated(false);
|
||||
if(gamelist_initialized_) {
|
||||
gamelist_.apply_diff(*data.child("gamelist_diff"));
|
||||
gamelist_updated(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,6 +154,7 @@ private:
|
|||
/** Set to true when the widgets are intialized. Allows delayed
|
||||
* initialization on first positioning. */
|
||||
bool initialized_;
|
||||
bool gamelist_initialized_;
|
||||
|
||||
// Ensures standard hotkeys are coorectly handled
|
||||
const hotkey::basic_handler hotkey_handler_;
|
||||
|
|
Loading…
Add table
Reference in a new issue