diff --git a/applications/system/findmy/findmy_state.c b/applications/system/findmy/findmy_state.c index 8a60a312e5..d921f8d582 100644 --- a/applications/system/findmy/findmy_state.c +++ b/applications/system/findmy/findmy_state.c @@ -29,19 +29,16 @@ bool findmy_state_load(FindMyState* out_state) { if(!flipper_format_read_uint32(file, "transmit_power", &tmp, 1)) break; state.transmit_power = tmp; + if(!flipper_format_read_uint32(file, "tag_type", &tmp, 1)) break; + state.tag_type = tmp; + FURI_LOG_E("tag_type tmp", "%ld", tmp); + if(!flipper_format_read_bool(file, "show_mac", &state.show_mac, 1)) { // Support migrating from old config state.show_mac = false; flipper_format_rewind(file); } - if(!flipper_format_read_uint32(file, "tag_type", &tmp, 1)) { - // Support migrating from old config - tmp = FindMyTypeApple; - flipper_format_rewind(file); - } - state.tag_type = tmp; - if(!flipper_format_read_hex(file, "mac", state.mac, sizeof(state.mac))) break; if(!flipper_format_read_hex( @@ -162,6 +159,7 @@ void findmy_state_save(FindMyState* state) { if(!flipper_format_write_uint32(file, "transmit_power", &tmp, 1)) break; tmp = state->tag_type; + FURI_LOG_E("tag_type at save", "%ld", tmp); if(!flipper_format_write_uint32(file, "tag_type", &tmp, 1)) break; if(!flipper_format_write_bool(file, "show_mac", &state->show_mac, 1)) break;