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

Refactoring of nextcloud code #98

Open
fel115 opened this issue Oct 12, 2023 · 3 comments
Open

Refactoring of nextcloud code #98

fel115 opened this issue Oct 12, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@fel115
Copy link
Collaborator

fel115 commented Oct 12, 2023

#75 (comment)

Refactor the Nextcloud Commands loop.

@fel115 fel115 added the enhancement New feature or request label Oct 12, 2023
@markus2330 markus2330 changed the title Refactroing of nextcloud code Refacotring of nextcloud code Oct 14, 2023
@markus2330 markus2330 changed the title Refacotring of nextcloud code Refactoring of nextcloud code Oct 14, 2023
@horenso
Copy link
Collaborator

horenso commented Oct 21, 2023

I'm working on the config of the PIN in the nextcloud loop. Do we refactor the config to have the mutex in the config?
I want to set the PIN code via Nextcloud, I could do the same as in Signals where Nextcloud takes a Arc<Mutex<Config<'a>>>
and then we refactor the Mutex in Config afterwards, or should we do this before? @fel115

@fel115
Copy link
Collaborator Author

fel115 commented Oct 21, 2023

I think it would be better to refactor the config before as we have problems with the execution of config.sync() in the signals module. We always get a panic, by executing the sync function in the signals module.

Maybe we could also use a get_background_task for config. So we don't need to use mutex and remember/restore baseline (env), set alarm and set pin can be handled by this function. By this method we only need to get the environment data to the config file to restore baseline.

@markus2330
Copy link
Contributor

Changing of PIN is only one of many commands and not the most important one, so please implement the other commands properly first (refactor the code that implements the commands).

I updated the full list of commands in the use case #125. But the system should be flexible and new commands should be easy to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants