Skip to content

Commit 42b4fd3

Browse files
committed
Minor
1 parent 5ac7093 commit 42b4fd3

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

JL.Core/Audio/AudioUtils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static class AudioUtils
2121
}
2222
};
2323

24-
private static readonly FrozenDictionary<string, string> s_mediaTypeToExtensionDict = new KeyValuePair<string, string>[6]
24+
private static readonly FrozenDictionary<string, string> s_mediaTypeToExtensionDict = new KeyValuePair<string, string>[]
2525
{
2626
new("mpeg", "mp3"),
2727
new("3gpp", "3gp"),

JL.Core/Dicts/Interfaces/IDictRecordWithSingleReading.cs

-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ namespace JL.Core.Dicts.Interfaces;
22

33
internal interface IDictRecordWithSingleReading : IDictRecord
44
{
5-
public string PrimarySpelling { get; }
65
public string? Reading { get; }
76
}

JL.Core/Dicts/PitchAccent/PitchAccentRecord.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55

66
namespace JL.Core.Dicts.PitchAccent;
77

8-
public sealed class PitchAccentRecord : IDictRecord, IEquatable<PitchAccentRecord>
8+
internal sealed class PitchAccentRecord : IDictRecord, IEquatable<PitchAccentRecord>
99
{
1010
public string Spelling { get; }
1111
public string? Reading { get; }
1212
public byte Position { get; }
1313

14-
internal PitchAccentRecord(string spelling, string? reading, byte position)
14+
public PitchAccentRecord(string spelling, string? reading, byte position)
1515
{
1616
Spelling = spelling;
1717
Reading = reading;
1818
Position = position;
1919
}
2020

21-
internal PitchAccentRecord(List<JsonElement> jsonElements)
21+
public PitchAccentRecord(List<JsonElement> jsonElements)
2222
{
2323
Spelling = jsonElements[0].GetString()!.GetPooledString();
2424

JL.Core/Utilities/JapaneseUtils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public static string RemovePunctuation(string text)
472472
return sb.ToString();
473473
}
474474

475-
public static string GetPrimarySpellingAndReadingMapping(string primarySpelling, string reading)
475+
internal static string GetPrimarySpellingAndReadingMapping(string primarySpelling, string reading)
476476
{
477477
if (!KanaRegex.IsMatch(primarySpelling))
478478
{

JL.Windows/GUI/PopupWindow.xaml.cs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1308,11 +1308,9 @@ private Task HandleAudioButtonClick()
13081308
{
13091309
return PopupWindowUtils.PlayAudio(lookupResult.PrimarySpelling, lookupResult.Readings?[0]);
13101310
}
1311-
else
1312-
{
1313-
ReadingSelectionWindow.Show(this, lookupResult.PrimarySpelling, lookupResult.Readings);
1314-
return Task.CompletedTask;
1315-
}
1311+
1312+
ReadingSelectionWindow.Show(this, lookupResult.PrimarySpelling, lookupResult.Readings);
1313+
return Task.CompletedTask;
13161314
}
13171315

13181316
private Task HandleMining(bool minePrimarySpelling)
@@ -1894,7 +1892,7 @@ private async void PrimarySpellingTextBox_PreviewMouseUp(object sender, MouseBut
18941892
if ((configManager.LookupOnMouseClickOnly
18951893
|| configManager.LookupOnSelectOnly
18961894
|| e.ChangedButton != configManager.MiningModeMouseButton)
1897-
&& (e.ChangedButton == configManager.MinePrimarySpellingMouseButton))
1895+
&& e.ChangedButton == configManager.MinePrimarySpellingMouseButton)
18981896
{
18991897
await HandleMining(true).ConfigureAwait(false);
19001898
}

0 commit comments

Comments
 (0)