mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Recreate panels only while loading/loaded
This commit is contained in:
@ -17,6 +17,7 @@ using osu.Game.Overlays.SearchableList;
|
|||||||
using osu.Game.Overlays.Social;
|
using osu.Game.Overlays.Social;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
@ -44,7 +45,9 @@ namespace osu.Game.Overlays
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
users = value ?? Array.Empty<User>();
|
users = value ?? Array.Empty<User>();
|
||||||
recreatePanels();
|
|
||||||
|
if (LoadState >= LoadState.Ready)
|
||||||
|
recreatePanels();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +73,6 @@ namespace osu.Game.Overlays
|
|||||||
};
|
};
|
||||||
|
|
||||||
Header.Tabs.Current.ValueChanged += _ => queueUpdate();
|
Header.Tabs.Current.ValueChanged += _ => queueUpdate();
|
||||||
|
|
||||||
Filter.Tabs.Current.ValueChanged += _ => onFilterUpdate();
|
Filter.Tabs.Current.ValueChanged += _ => onFilterUpdate();
|
||||||
|
|
||||||
Filter.DisplayStyleControl.DisplayStyle.ValueChanged += _ => recreatePanels();
|
Filter.DisplayStyleControl.DisplayStyle.ValueChanged += _ => recreatePanels();
|
||||||
@ -88,6 +90,12 @@ namespace osu.Game.Overlays
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
recreatePanels();
|
||||||
|
}
|
||||||
|
|
||||||
private APIRequest getUsersRequest;
|
private APIRequest getUsersRequest;
|
||||||
|
|
||||||
private readonly Bindable<string> currentQuery = new Bindable<string>();
|
private readonly Bindable<string> currentQuery = new Bindable<string>();
|
||||||
|
Reference in New Issue
Block a user