feature: remember the state of repository sidebar (#823)

This commit is contained in:
leo 2024-12-18 15:33:09 +08:00
parent 7526def448
commit 5ec8279d38
No known key found for this signature in database
4 changed files with 112 additions and 37 deletions

View file

@ -90,31 +90,31 @@ namespace SourceGit.Models
{
get;
set;
} = new AvaloniaList<Filter>();
} = [];
public AvaloniaList<CommitTemplate> CommitTemplates
{
get;
set;
} = new AvaloniaList<CommitTemplate>();
} = [];
public AvaloniaList<string> CommitMessages
{
get;
set;
} = new AvaloniaList<string>();
} = [];
public AvaloniaList<IssueTrackerRule> IssueTrackerRules
{
get;
set;
} = new AvaloniaList<IssueTrackerRule>();
} = [];
public AvaloniaList<CustomAction> CustomActions
{
get;
set;
} = new AvaloniaList<CustomAction>();
} = [];
public bool EnableAutoFetch
{
@ -158,6 +158,42 @@ namespace SourceGit.Models
set;
} = "---";
public bool IsLocalBranchesExpandedInSideBar
{
get;
set;
} = true;
public bool IsRemotesExpandedInSideBar
{
get;
set;
} = false;
public bool IsTagsExpandedInSideBar
{
get;
set;
} = false;
public bool IsSubmodulesExpandedInSideBar
{
get;
set;
} = false;
public bool IsWorktreeExpandedInSideBar
{
get;
set;
} = false;
public List<string> ExpandedBranchNodesInSideBar
{
get;
set;
} = [];
public Dictionary<string, FilterMode> CollectHistoriesFilters()
{
var map = new Dictionary<string, FilterMode>();