Move unknown OSD elements to the end of the list
parent
095c98e838
commit
c9793132ef
|
@ -1065,7 +1065,7 @@ OSD.constants = {
|
|||
},
|
||||
},
|
||||
UNKNOWN_DISPLAY_FIELD: {
|
||||
name: 'UNKNOWN_',
|
||||
name: 'UNKNOWN',
|
||||
text: 'osdTextElementUnknown',
|
||||
desc: 'osdDescElementUnknown',
|
||||
default_position: -1,
|
||||
|
@ -1813,7 +1813,7 @@ OSD.msp = {
|
|||
ignoreSize = true;
|
||||
}
|
||||
d.display_items.push($.extend({
|
||||
name: suffix ? c.name + suffix : c.name,
|
||||
name: c.name,
|
||||
text: suffix ? [c.text, suffix] : c.text,
|
||||
desc: c.desc,
|
||||
index: j,
|
||||
|
@ -2354,7 +2354,10 @@ TABS.osd.initialize = function (callback) {
|
|||
);
|
||||
}
|
||||
|
||||
// Insert in alphabetical order
|
||||
// Insert in alphabetical order, with unknown fields at the end
|
||||
if (field.name == OSD.constants.UNKNOWN_DISPLAY_FIELD.name) {
|
||||
$displayFields.append($field);
|
||||
} else {
|
||||
let added = false;
|
||||
$displayFields.children().each(function() {
|
||||
if ($(this).text().localeCompare($field.text(), i18n.getCurrentLocale(), { sensitivity: 'base' }) > 0) {
|
||||
|
@ -2367,6 +2370,7 @@ TABS.osd.initialize = function (callback) {
|
|||
$displayFields.append($field);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GUI.switchery();
|
||||
// buffer the preview
|
||||
|
|
Loading…
Reference in New Issue