Skip to content

Commit

Permalink
Merge pull request #2162 from andy840119/upgrade-package-to-latest
Browse files Browse the repository at this point in the history
Upgrade package to latest.
  • Loading branch information
andy840119 authored Jan 13, 2024
2 parents 1a69c9f + c3ca607 commit 5805806
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Karaoke.Tests/Beatmaps/TestElementId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public void TestCreateElementId(string id, bool created)
{
Assert.DoesNotThrow(() =>
{
var _ = new ElementId(id);
_ = new ElementId(id);
});
}
else
{
Assert.Throws<ArgumentException>(() =>
{
var _ = new ElementId(id);
_ = new ElementId(id);
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,20 @@ public ITooltip<Issue[]> GetCustomTooltip()
public Issue[]? TooltipContent { get; private set; }

public Popover GetPopover()
=> new IssueTablePopover(this, bindableIssues);
{
if (Parent == null)
throw new InvalidCastException("Should attach parent before get popover.");

return new IssueTablePopover(Parent.Dependencies, bindableIssues);
}

private partial class IssueTablePopover : OsuPopover
{
private readonly CompositeDrawable parentDrawable;
private readonly IReadOnlyDependencyContainer dependencyContainer;

public IssueTablePopover(CompositeDrawable parent, IReadOnlyCollection<Issue> issues)
public IssueTablePopover(IReadOnlyDependencyContainer dependencyContainer, IReadOnlyCollection<Issue> issues)
{
parentDrawable = parent;
this.dependencyContainer = dependencyContainer;

Child = new Container
{
Expand All @@ -136,7 +141,7 @@ public IssueTablePopover(CompositeDrawable parent, IReadOnlyCollection<Issue> is
Scale = new Vector2(0.7f),
Action = () =>
{
var verifier = parentDrawable.Dependencies.Get<ILyricEditorVerifier>();
var verifier = dependencyContainer.Get<ILyricEditorVerifier>();
verifier.Refresh();
// should close the popover if has no issue.
Expand All @@ -152,9 +157,9 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnl
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));

dependencies.Cache(parentDrawable.Dependencies.Get<LyricEditorColourProvider>());
dependencies.CacheAs(parentDrawable.Dependencies.Get<ILyricEditorState>());
dependencies.CacheAs(parentDrawable.Dependencies.Get<IIssueNavigator>());
dependencies.Cache(dependencyContainer.Get<LyricEditorColourProvider>());
dependencies.CacheAs(dependencyContainer.Get<ILyricEditorState>());
dependencies.CacheAs(dependencyContainer.Get<IIssueNavigator>());

return dependencies;
}
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ppy.osu.Game" Version="2023.1231.0" />
<PackageReference Include="ppy.osu.Game" Version="2024.113.0" />
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.Analysis.Kuromoji" Version="4.8.0-beta00016" />
<PackageReference Include="SixLabors.Fonts" Version="2.0.1" />
Expand Down

0 comments on commit 5805806

Please sign in to comment.