mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-15 21:22:40 +00:00
Don't retranslate if the language didn't change
This commit is contained in:
@@ -769,9 +769,13 @@ Flickable {
|
|||||||
}
|
}
|
||||||
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
||||||
onActivated : {
|
onActivated : {
|
||||||
StreamingPreferences.language = languageListModel.get(currentIndex).val
|
// Retranslating is expensive, so only do it if the language actually changed
|
||||||
if (!StreamingPreferences.retranslate()) {
|
var new_language = languageListModel.get(currentIndex).val
|
||||||
ToolTip.show(qsTr("You must restart Moonlight for this change to take effect"), 5000)
|
if (StreamingPreferences.language !== new_language) {
|
||||||
|
StreamingPreferences.language = languageListModel.get(currentIndex).val
|
||||||
|
if (!StreamingPreferences.retranslate()) {
|
||||||
|
ToolTip.show(qsTr("You must restart Moonlight for this change to take effect"), 5000)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user