Fix an empty dialog would appear if the selected language was empty (#873)
Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
This commit is contained in:
parent
4fc00ea447
commit
c09543b9de
|
@ -145,6 +145,7 @@ public class StatusEditorViewModel: NSObject, ObservableObject {
|
|||
func evaluateLanguages() {
|
||||
if let detectedLang = detectLanguage(text: statusText.string),
|
||||
let selectedLanguage = selectedLanguage,
|
||||
selectedLanguage != "",
|
||||
selectedLanguage != detectedLang
|
||||
{
|
||||
languageConfirmationDialogLanguages = ["detected": detectedLang,
|
||||
|
|
Loading…
Reference in New Issue