1
0
Fork 0

fixed a crash when assigning hotkeys

This commit is contained in:
sspanak 2024-10-28 19:52:46 +02:00 committed by Dimo Karaivanov
parent bc64a9172b
commit 1a1222f069

View file

@ -114,10 +114,15 @@ public class SectionKeymap {
return false;
}
((DropDownPreference) preference).setValue(newKey.toString());
previewCurrentKey((DropDownPreference) preference, newKey.toString());
populateOtherItems((DropDownPreference) preference);
return true;
try {
((DropDownPreference) preference).setValue(newKey.toString());
previewCurrentKey((DropDownPreference) preference, newKey.toString());
populateOtherItems((DropDownPreference) preference);
return true;
} catch (Exception e) {
Logger.e("SectionKeymap.onItemClick", "Failed setting new hotkey. " + e.getMessage());
return false;
}
});
}