Fix windows title may become empty

This commit is contained in:
2023-09-16 18:44:38 +08:00
parent 56751e2c13
commit 3c2e75d9b1

View File

@@ -323,7 +323,8 @@ void setCurrentTitle(String title, int primaryColor,
if (!isPrefix && includePrefix && _prefix != null) { if (!isPrefix && includePrefix && _prefix != null) {
title = "$_prefix - $title"; title = "$_prefix - $title";
} }
if (usePrefix && _prefix != null) { if (usePrefix) {
if (_prefix == null) return;
title = _prefix!; title = _prefix!;
} }
if (_currentTitle != null && title == _currentTitle) return; if (_currentTitle != null && title == _currentTitle) return;