Compare commits
1 Commits
312b411654
...
v1.7.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00ef11ac33 |
@@ -162,6 +162,26 @@ public sealed partial class ListsIslandViewModel : ViewModelBase
|
||||
_worker.WorktreeUpdatedEvent += _id => _ = RefreshCountsAsync();
|
||||
_worker.ConnectionRestoredEvent += () => _ = RefreshCountsAsync();
|
||||
}
|
||||
|
||||
Loc.LanguageChanged += (_, _) => RefreshLocalizedLabels();
|
||||
}
|
||||
|
||||
private static string? SmartListNameKey(string id) => id switch
|
||||
{
|
||||
"smart:my-day" => "vm.lists.smartMyDay",
|
||||
"smart:important" => "vm.lists.smartImportant",
|
||||
"smart:planned" => "vm.lists.smartPlanned",
|
||||
"virtual:queued" => "vm.lists.virtualQueue",
|
||||
"virtual:running" => "vm.lists.virtualRunning",
|
||||
"virtual:review" => "vm.lists.virtualReview",
|
||||
_ => null,
|
||||
};
|
||||
|
||||
private void RefreshLocalizedLabels()
|
||||
{
|
||||
foreach (var item in SmartLists)
|
||||
if (SmartListNameKey(item.Id) is { } key) item.Name = Loc.T(key);
|
||||
OnPropertyChanged(nameof(MachineNameLocal));
|
||||
}
|
||||
|
||||
public async Task LoadAsync(CancellationToken ct = default)
|
||||
|
||||
Reference in New Issue
Block a user