mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-13 06:34:23 -04:00
Clean up
This commit is contained in:
parent
5e9c7392db
commit
90d71c5b9e
4 changed files with 18 additions and 8 deletions
|
@ -8,8 +8,8 @@ public static class BinaryExtensions
|
||||||
{
|
{
|
||||||
var buffer = new StringBuilder(2 * data.Length);
|
var buffer = new StringBuilder(2 * data.Length);
|
||||||
|
|
||||||
foreach (var t in data)
|
foreach (var b in data)
|
||||||
buffer.Append(t.ToString("X2"));
|
buffer.Append(b.ToString("X2"));
|
||||||
|
|
||||||
return buffer.ToString();
|
return buffer.ToString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,10 +46,13 @@ public partial class SettingsService : SettingsBase
|
||||||
public override void Save()
|
public override void Save()
|
||||||
{
|
{
|
||||||
// Clear the token if it's not supposed to be persisted
|
// Clear the token if it's not supposed to be persisted
|
||||||
|
var lastToken = LastToken;
|
||||||
if (!IsTokenPersisted)
|
if (!IsTokenPersisted)
|
||||||
LastToken = null;
|
LastToken = null;
|
||||||
|
|
||||||
base.Save();
|
base.Save();
|
||||||
|
|
||||||
|
LastToken = lastToken;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,15 @@ public class DashboardViewModel : PropertyChangedBase
|
||||||
|
|
||||||
_progressMuxer = Progress.CreateMuxer().WithAutoReset();
|
_progressMuxer = Progress.CreateMuxer().WithAutoReset();
|
||||||
|
|
||||||
this.Bind(o => o.IsBusy, (_, _) => NotifyOfPropertyChange(() => IsProgressIndeterminate));
|
this.Bind(
|
||||||
Progress.Bind(o => o.Current, (_, _) => NotifyOfPropertyChange(() => IsProgressIndeterminate));
|
o => o.IsBusy,
|
||||||
|
(_, _) => NotifyOfPropertyChange(() => IsProgressIndeterminate)
|
||||||
|
);
|
||||||
|
|
||||||
|
Progress.Bind(
|
||||||
|
o => o.Current,
|
||||||
|
(_, _) => NotifyOfPropertyChange(() => IsProgressIndeterminate)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnViewLoaded()
|
public void OnViewLoaded()
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Margin="16,16,16,8"
|
Margin="16"
|
||||||
FontSize="19"
|
FontSize="19"
|
||||||
FontWeight="Light"
|
FontWeight="Light"
|
||||||
Text="Settings" />
|
Text="Settings" />
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
Margin="16,8"
|
Margin="16,8"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
LastChildFill="False"
|
LastChildFill="False"
|
||||||
ToolTip="Save last used token in a file so that it can be persisted between sessions">
|
ToolTip="Save the last used token to a file so that it can be persisted between sessions">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
DockPanel.Dock="Left"
|
DockPanel.Dock="Left"
|
||||||
|
@ -132,13 +132,13 @@
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Save button -->
|
<!-- Close button -->
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="16"
|
Margin="16"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Command="{s:Action Close}"
|
Command="{s:Action Close}"
|
||||||
Content="SAVE"
|
Content="CLOSE"
|
||||||
IsCancel="True"
|
IsCancel="True"
|
||||||
IsDefault="True"
|
IsDefault="True"
|
||||||
Style="{DynamicResource MaterialDesignOutlinedButton}" />
|
Style="{DynamicResource MaterialDesignOutlinedButton}" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue