Fix lobby friend and ignores filters in the gamelist
This commit is contained in:
parent
738a47cd16
commit
908f59f738
2 changed files with 7 additions and 0 deletions
|
@ -104,6 +104,7 @@ user_info::user_info(const config& c)
|
|||
, registered(utils::string_bool(c["registered"]))
|
||||
, observing(c["status"] == "observing")
|
||||
{
|
||||
update_relation();
|
||||
}
|
||||
|
||||
void user_info::update_state(int selected_game_id, const room_info* current_room /*= NULL*/)
|
||||
|
@ -121,6 +122,11 @@ void user_info::update_state(int selected_game_id, const room_info* current_room
|
|||
state = LOBBY;
|
||||
}
|
||||
}
|
||||
update_relation();
|
||||
}
|
||||
|
||||
void user_info::update_relation()
|
||||
{
|
||||
if (name == preferences::login()) {
|
||||
relation = ME;
|
||||
} else if (preferences::is_ignored(name)) {
|
||||
|
|
|
@ -87,6 +87,7 @@ struct user_info
|
|||
user_info(const config& c);
|
||||
|
||||
void update_state(int selected_game_id, const room_info* current_room = NULL);
|
||||
void update_relation();
|
||||
|
||||
enum user_relation { FRIEND, ME, NEUTRAL, IGNORED };
|
||||
enum user_state { LOBBY, SEL_ROOM, GAME, SEL_GAME };
|
||||
|
|
Loading…
Add table
Reference in a new issue