Skip to content

Commit

Permalink
v3.0.0.49 - Fix blacklist getting wiped sometimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
e621-ReBot committed Jan 31, 2025
1 parent f79b64d commit a6baba4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e621 ReBot v3/Windows/Window_Blacklist.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Blacklist" Height="256" Width="512" WindowStyle="ToolWindow" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" Loaded="Window_Loaded" Closed="Window_Closed">
Title="Blacklist" Height="256" Width="512" WindowStyle="ToolWindow" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" Loaded="Window_Loaded" Closing="Window_Closing" Closed="Window_Closed">

<Grid>
<TextBox x:Name="Blacklist_TextBox" Background="Silver" TextWrapping="NoWrap" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" Margin="2" TabIndex="1" ToolTip="Tags can be combined by entering them on the same line, separated by a space.&#xA;Each line is regarded separately.&#xA;Use shortened terms 'e', 'q', 's' for ratings.&#xA;&#xA;Blacklist applies to downloads from e621 via API (pool downloads ignore it)." AcceptsReturn="True" PreviewKeyDown="Blacklist_TextBox_PreviewKeyDown"/>
Expand Down
7 changes: 6 additions & 1 deletion e621 ReBot v3/Windows/Window_Blacklist.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Input;
Expand Down Expand Up @@ -47,7 +48,7 @@ private void Blacklist_TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
}
}

private void Window_Closed(object sender, EventArgs e)
private void Window_Closing(object sender, CancelEventArgs e)
{
List<string> NewBlacklist = new List<string>();
Blacklist_TextBox.Text = Blacklist_TextBox.Text.Trim().ToLower();
Expand All @@ -57,6 +58,10 @@ private void Window_Closed(object sender, EventArgs e)
if (TBLine.Length > 0) NewBlacklist.Add(TBLine);
}
AppSettings.Blacklist = NewBlacklist;
}

private void Window_Closed(object sender, EventArgs e)
{
_RefHolder = null;
Owner.Activate();
}
Expand Down
2 changes: 1 addition & 1 deletion e621 ReBot v3/e621 ReBot v3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ApplicationIcon>Resources\ReBot_Icon.ico</ApplicationIcon>
<Platforms>x64</Platforms>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<FileVersion>3.0.0.48</FileVersion>
<FileVersion>3.0.0.49</FileVersion>
<StartupObject>e621_ReBot_v3.App</StartupObject>
<IsPublishable>False</IsPublishable>
<RepositoryUrl>https://github.com/e621-ReBot/e621-ReBot-v3</RepositoryUrl>
Expand Down

0 comments on commit a6baba4

Please sign in to comment.