1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 08:02:55 +08:00

Set DocumentUrl inside CreateChildDependencies

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-05-26 13:55:16 +07:00 committed by GitHub
parent 200592114f
commit 04f16c0783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,10 +23,14 @@ namespace osu.Game.Graphics.Containers.Markdown
LineSpacing = 21;
}
[BackgroundDependencyLoader]
private void load(IAPIProvider api)
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var api = parent.Get<IAPIProvider>();
// needs to be set before the base BDL call executes to avoid invalidating any already populated markdown content.
DocumentUrl = api.WebsiteRootUrl;
return base.CreateChildDependencies(parent);
}
protected override void AddMarkdownComponent(IMarkdownObject markdownObject, FillFlowContainer container, int level)