[core] Encapsulate entity preference creation to prepare for hash migration (#13505)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2026-01-26 17:35:45 -10:00
1 parent cd6314dc96
commit 75a78b2bf3
32 files changed
+97 -38

No files matched your search

@@ -11,7 +11,7 @@ void TemplateSelect::setup() {
size_t index = this->initial_option_index_;
if (this->restore_value_) {
this->pref_ = global_preferences->make_preference<size_t>(this->get_preference_hash());
this->pref_ = this->make_entity_preference<size_t>();
size_t restored_index;
if (this->pref_.load(&restored_index) && this->has_index(restored_index)) {
index = restored_index;