mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-09 11:51:59 -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);
|
||||
|
||||
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}" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue