Skip to content

Commit

Permalink
Removed the limitation on the length of the processor or video card n…
Browse files Browse the repository at this point in the history
…ame for new versions of devices on esp-idf
  • Loading branch information
TTLC198 committed Sep 9, 2023
1 parent 6bd9b5a commit 3203019
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ public bool IsAutoDetectHardwareEnabled
}
}

public int CustomNameMaxLength =>
SettingsService.Settings.IsDeviceBackwardCompatibilityEnabled
? 23
: 50;

public AppearanceSettingsTabViewModel(SettingsService settingsService, HardwareMonitorService hardwareMonitorService)
: base(settingsService, 2, "Appearance")
{
Expand Down
6 changes: 4 additions & 2 deletions HSMonitor/Views/Settings/AppearanceSettingsTabView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
Mode="TwoWay">
<Binding.ValidationRules>
<validationRules:HardwareNameLengthRule
Max="23"
Max="{Binding CustomNameMaxLength}"
Min="5"
ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
Expand Down Expand Up @@ -90,7 +91,8 @@
Mode="TwoWay">
<Binding.ValidationRules>
<validationRules:HardwareNameLengthRule
Max="23"
Max="{Binding CustomNameMaxLength}"
Min="5"
ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
Expand Down

0 comments on commit 3203019

Please sign in to comment.