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

Autolock with pin code #338

Merged
merged 4 commits into from
Feb 17, 2023
Merged

Autolock with pin code #338

merged 4 commits into from
Feb 17, 2023

Conversation

Willy-JL
Copy link
Contributor

@Willy-JL Willy-JL commented Feb 15, 2023

What's new

  • Desktop autolock uses pin code

Verification

  • Set pin code, enable autolock, wait, flipper locked with pin

Checklist (For Reviewer)

  • PR has description of feature/bug
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@Willy-JL Willy-JL requested a review from xMasterX as a code owner February 15, 2023 02:05
Copy link

@Slippin12b Slippin12b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need some help, I don't recall how, but I set this up but I don't remember my pin is there a default pin?

@ClaraCrazy
Copy link

absolute bozo moment. no theres no default pin. the pin is whatever you have set lol.

Copy link
Member

@xMasterX xMasterX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, one problem with this change, it actually replaces auto keyboard lock with pin lock
When i have Pin set-up i can choose to lock with pin or not in top menu, but there it will just replace auto lock to use only pin if i have one,

It should be re-done in different way, for example we can add
bool autolock_with_pin; into DesktopSettings in applications/services/desktop/desktop_settings.h
And make UI selector in desktop settings app Auto Lock with pin: ON / OFF
And there we can just add

if (desktop->settings.autolock_with_pin){
    if(desktop->settings.pin_code.length > 0) {

and we will use pin lock, in other case we will just call regular lock as it is done now

I can make that changes myself but later, tell me if you gonna make it optional as i described

@Willy-JL
Copy link
Contributor Author

Hm you're right, that's a good idea! Will do it myself, don't worry.

@Willy-JL Willy-JL marked this pull request as draft February 16, 2023 22:50
@Willy-JL Willy-JL marked this pull request as ready for review February 16, 2023 23:21
@Willy-JL Willy-JL requested a review from xMasterX February 16, 2023 23:22
Settings are saved as binary struct dump, so if we make any change to struct, we need to bump a version since it will not be compatible with older file in any case
Copy link
Member

@xMasterX xMasterX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
I made small change, all details described in my last commit in its desc
All works as it should

@xMasterX xMasterX merged commit faac423 into DarkFlippers:dev Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants