Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FL-3312] fix retry count reset on reboot #2671

Merged
merged 2 commits into from
May 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion applications/services/desktop/desktop.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ static void desktop_auto_lock_inhibit(Desktop* desktop) {

void desktop_lock(Desktop* desktop) {
furi_hal_rtc_set_flag(FuriHalRtcFlagLock);
furi_hal_rtc_set_pin_fails(0);

if(desktop->settings.pin_code.length) {
Cli* cli = furi_record_open(RECORD_CLI);
Expand All @@ -159,6 +158,7 @@ void desktop_unlock(Desktop* desktop) {
scene_manager_search_and_switch_to_previous_scene(desktop->scene_manager, DesktopSceneMain);
desktop_auto_lock_arm(desktop);
furi_hal_rtc_reset_flag(FuriHalRtcFlagLock);
furi_hal_rtc_set_pin_fails(0);

if(desktop->settings.pin_code.length) {
Cli* cli = furi_record_open(RECORD_CLI);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ static void desktop_scene_pin_input_back_callback(void* context) {
static void desktop_scene_pin_input_done_callback(const PinCode* pin_code, void* context) {
Desktop* desktop = (Desktop*)context;
if(desktop_pin_compare(&desktop->settings.pin_code, pin_code)) {
furi_hal_rtc_set_pin_fails(0);
view_dispatcher_send_custom_event(desktop->view_dispatcher, DesktopPinInputEventUnlocked);
} else {
uint32_t pin_fails = furi_hal_rtc_get_pin_fails();
Expand Down