mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-24 10:34:26 +08:00
0.8.0.3
自习功能可关闭
This commit is contained in:
@@ -58,6 +58,7 @@ public partial class StudySessionHistoryWidget : UserControl, IDesktopComponentW
|
||||
private bool _isDisposed;
|
||||
private bool _isCompactMode;
|
||||
private bool _isUltraCompactMode;
|
||||
private bool _studyEnabled = true;
|
||||
private string? _loadingSessionId;
|
||||
private HistoryDialogMode _dialogMode;
|
||||
private string? _dialogSessionId;
|
||||
@@ -179,6 +180,19 @@ public partial class StudySessionHistoryWidget : UserControl, IDesktopComponentW
|
||||
TitleTextBlock.Text = L("study.session_history.title", "Session History");
|
||||
TitleTextBlock.Foreground = CreateAdaptiveBrush(panelSamples, PrimaryColorCandidates, MinTextContrast);
|
||||
|
||||
if (!_studyEnabled)
|
||||
{
|
||||
if (_dialogMode != HistoryDialogMode.None)
|
||||
{
|
||||
CloseDialog();
|
||||
}
|
||||
|
||||
SessionListPanel.Children.Clear();
|
||||
StatusTextBlock.Text = L("study.widget.disabled_hint", "请在设置中开启");
|
||||
StatusTextBlock.Foreground = CreateAdaptiveBrush(panelSamples, SecondaryColorCandidates, MinTextContrast);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_transientStatus is not null && DateTimeOffset.UtcNow > _transientStatusExpireAt)
|
||||
{
|
||||
_transientStatus = null;
|
||||
@@ -581,6 +595,7 @@ public partial class StudySessionHistoryWidget : UserControl, IDesktopComponentW
|
||||
{
|
||||
var snapshot = _settingsService.Load();
|
||||
_languageCode = _localizationService.NormalizeLanguageCode(snapshot.LanguageCode);
|
||||
_studyEnabled = snapshot.StudyEnabled;
|
||||
}
|
||||
|
||||
private void UpdateAdaptiveLayout()
|
||||
|
||||
Reference in New Issue
Block a user