Skip to content

Commit

Permalink
Update Include.psm1
Browse files Browse the repository at this point in the history
Less flickering
  • Loading branch information
UselessGuru committed Sep 3, 2022
1 parent fcf0aac commit 8e8bfe5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Includes/Include.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -990,11 +990,7 @@ Function Write-Message {

If ($Config.LogToScreen -and $Level -in $Config.LogToScreen) {
# Update status text box in legacy GUI
If ($Variables.LabelStatus) {
# Keep only 100 lines, more lines impact performance
$Variables.LabelStatus.Lines = @($Variables.LabelStatus.Lines | Select-Object -Last 100)
$Variables.LabelStatus.AppendText("$Date $($Level.ToUpper()): $Message`n")
}
If ($Variables.LabelStatus) { $Variables.LabelStatus.AppendText("`r`n$Date $($Level.ToUpper()): $Message") }

# Write to console
Switch ($Level) {
Expand Down

0 comments on commit 8e8bfe5

Please sign in to comment.