Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Aug 20, 2024
1 parent 5fab121 commit b5c286a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions JL.Core/Lookup/LookupUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ public static class LookupUtils

if (DictUtils.DBIsUsedForAtLeastOneDict)
{
parameter = DBUtils.GetParameter(textInHiraganaList);
parameter = DBUtils.GetParameter(textInHiraganaList.Count);

deconjugatedTexts = deconjugationResultsList
.SelectMany(static lf => lf.Select(static f => f.Text))
.Distinct().ToList();

if (deconjugatedTexts.Count > 0)
{
verbParameter = DBUtils.GetParameter(deconjugatedTexts);
verbParameter = DBUtils.GetParameter(deconjugatedTexts.Count);
}

if (DictUtils.DBIsUsedForAtLeastOneYomichanDict)
Expand Down Expand Up @@ -561,7 +561,7 @@ private static Dictionary<string, IntermediaryResult> GetWordResults(List<string
}
else
{
longVowelQueryOrParameter = DBUtils.GetParameter(textWithoutLongVowelMarkList);
longVowelQueryOrParameter = DBUtils.GetParameter(textWithoutLongVowelMarkList.Count);
}

dbWordDictForLongVowelConversion = getRecordsFromDB!(dict.Name, textWithoutLongVowelMarkList, longVowelQueryOrParameter);
Expand Down
4 changes: 2 additions & 2 deletions JL.Core/Utilities/DBUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ public static void DeleteDB(string dbPath)
File.Delete(dbPath);
}

internal static string GetParameter(List<string> terms)
internal static string GetParameter(int parameterCount)
{
StringBuilder parameterBuilder = new("(@1");
for (int i = 1; i < terms.Count; i++)
for (int i = 1; i < parameterCount; i++)
{
_ = parameterBuilder.Append(CultureInfo.InvariantCulture, $", @{i + 1}");
}
Expand Down
4 changes: 2 additions & 2 deletions JL.Windows/ConfigManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1249,10 +1249,10 @@ public static async Task SavePreferences(PreferencesWindow preferenceWindow)
preferenceWindow.CopyPrimarySpellingToClipboardMouseButtonComboBox.SelectedValue.ToString()!);

ConfigDBManager.UpdateSetting(connection, "MainWindowTopPosition",
MainWindow.Instance.Top.ToString(CultureInfo.InvariantCulture));
(MainWindow.Instance.Top * WindowsUtils.Dpi.DpiScaleY).ToString(CultureInfo.InvariantCulture));

ConfigDBManager.UpdateSetting(connection, "MainWindowLeftPosition",
MainWindow.Instance.Left.ToString(CultureInfo.InvariantCulture));
(MainWindow.Instance.Left * WindowsUtils.Dpi.DpiScaleX).ToString(CultureInfo.InvariantCulture));
}

ApplyPreferences();
Expand Down

0 comments on commit b5c286a

Please sign in to comment.