mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-01 15:49:11 +00:00
Clean up
This commit is contained in:
@@ -8,8 +8,8 @@ public static class BinaryExtensions
|
||||
{
|
||||
var buffer = new StringBuilder(2 * data.Length);
|
||||
|
||||
foreach (var t in data)
|
||||
buffer.Append(t.ToString("X2"));
|
||||
foreach (var b in data)
|
||||
buffer.Append(b.ToString("X2"));
|
||||
|
||||
return buffer.ToString();
|
||||
}
|
||||
|
||||
@@ -46,10 +46,13 @@ public partial class SettingsService : SettingsBase
|
||||
public override void Save()
|
||||
{
|
||||
// Clear the token if it's not supposed to be persisted
|
||||
var lastToken = LastToken;
|
||||
if (!IsTokenPersisted)
|
||||
LastToken = null;
|
||||
|
||||
base.Save();
|
||||
|
||||
LastToken = lastToken;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,15 @@ public class DashboardViewModel : PropertyChangedBase
|
||||
|
||||
_progressMuxer = Progress.CreateMuxer().WithAutoReset();
|
||||
|
||||
this.Bind(o => o.IsBusy, (_, _) => NotifyOfPropertyChange(() => IsProgressIndeterminate));
|
||||
Progress.Bind(o => o.Current, (_, _) => NotifyOfPropertyChange(() => IsProgressIndeterminate));
|
||||
this.Bind(
|
||||
o => o.IsBusy,
|
||||
(_, _) => NotifyOfPropertyChange(() => IsProgressIndeterminate)
|
||||
);
|
||||
|
||||
Progress.Bind(
|
||||
o => o.Current,
|
||||
(_, _) => NotifyOfPropertyChange(() => IsProgressIndeterminate)
|
||||
);
|
||||
}
|
||||
|
||||
public void OnViewLoaded()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Margin="16,16,16,8"
|
||||
Margin="16"
|
||||
FontSize="19"
|
||||
FontWeight="Light"
|
||||
Text="Settings" />
|
||||
@@ -71,7 +71,7 @@
|
||||
Margin="16,8"
|
||||
Background="Transparent"
|
||||
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
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Left"
|
||||
@@ -132,13 +132,13 @@
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<!-- Save button -->
|
||||
<!-- Close button -->
|
||||
<Button
|
||||
Grid.Row="2"
|
||||
Margin="16"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{s:Action Close}"
|
||||
Content="SAVE"
|
||||
Content="CLOSE"
|
||||
IsCancel="True"
|
||||
IsDefault="True"
|
||||
Style="{DynamicResource MaterialDesignOutlinedButton}" />
|
||||
|
||||
Reference in New Issue
Block a user