mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
fix: hide children behind the preference
This commit is contained in:
parent
f3c9690d47
commit
e8c8ac55a1
4 changed files with 25 additions and 8 deletions
|
@ -452,6 +452,7 @@
|
|||
<x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">Language</x:String>
|
||||
<x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">History Commits</x:String>
|
||||
<x:String x:Key="Text.Preference.General.ShowAuthorTime" xml:space="preserve">Show author time intead of commit time in graph</x:String>
|
||||
<x:String x:Key="Text.Preference.General.ShowChildren" xml:space="preserve">Show children in the comment details</x:String>
|
||||
<x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">Subject Guide Length</x:String>
|
||||
<x:String x:Key="Text.Preference.Git" xml:space="preserve">GIT</x:String>
|
||||
<x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">Enable Auto CRLF</x:String>
|
||||
|
|
|
@ -543,6 +543,8 @@ namespace SourceGit.ViewModels
|
|||
|
||||
_cancelToken = new Commands.Command.CancelToken();
|
||||
|
||||
if (Preference.Instance.ShowChildren)
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
var cmdChildren = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA, _repo.Settings.BuildHistoriesFilter()) { Cancel = _cancelToken };
|
||||
|
@ -550,6 +552,7 @@ namespace SourceGit.ViewModels
|
|||
if (!cmdChildren.Cancel.Requested)
|
||||
Dispatcher.UIThread.Post(() => Children.AddRange(children));
|
||||
});
|
||||
}
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
|
|
|
@ -294,6 +294,12 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _statisticsSampleColor, value);
|
||||
}
|
||||
|
||||
public bool ShowChildren
|
||||
{
|
||||
get => _showChildren;
|
||||
set => SetProperty(ref _showChildren, value);
|
||||
}
|
||||
|
||||
public List<RepositoryNode> RepositoryNodes
|
||||
{
|
||||
get;
|
||||
|
@ -617,5 +623,7 @@ namespace SourceGit.ViewModels
|
|||
private string _externalMergeToolPath = string.Empty;
|
||||
|
||||
private uint _statisticsSampleColor = 0xFF00FF00;
|
||||
|
||||
private bool _showChildren = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<TabItem.Header>
|
||||
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.General}"/>
|
||||
</TabItem.Header>
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32" ColumnDefinitions="Auto,*">
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.General.Locale}"
|
||||
HorizontalAlignment="Right"
|
||||
|
@ -114,6 +114,11 @@
|
|||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.General.Check4UpdatesOnStartup}"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=Check4UpdatesOnStartup, Mode=TwoWay}"/>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.General.ShowChildren}"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowChildren, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
|
|
Loading…
Reference in a new issue