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

chore(ui): implement listening to outside app activity #30

Conversation

Misieq01
Copy link
Collaborator

@Misieq01 Misieq01 commented Aug 7, 2024

Description

Change autominer behavior so it would listen to user mouse movement outside app context

Motivation and Context

How Has This Been Tested?

Manually

What process can a PR reviewer use to test or verify this change?

Turn on autominer and position mouse outside app window then be idle for 30 seconds, minining should by then start and if you move mouse it should stop

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@Misieq01 Misieq01 force-pushed the feat/change-scope-of-user-activity-detection branch from 500f1ec to 2fb1593 Compare August 7, 2024 07:47
@Misieq01 Misieq01 changed the title chore(UI): Implement listening to user movement outside app chore(UI): Implement listening to outside app activity Aug 7, 2024
@Misieq01 Misieq01 changed the title chore(UI): Implement listening to outside app activity chore(ui): Implement listening to outside app activity Aug 7, 2024
@Misieq01 Misieq01 changed the title chore(ui): Implement listening to outside app activity chore(ui): implement listening to outside app activity Aug 7, 2024
src/App.tsx Outdated Show resolved Hide resolved
src/App.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

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

I'm not really a fan of doing this in javascript. How about rather having a task in rust check the mouse movement and then send an event to the javascript "User is idle". Then the autominer can carry on from there. You could probably actually just do the whole start/stop mining in rust as well

@Misieq01
Copy link
Collaborator Author

Misieq01 commented Aug 7, 2024

I'm not really a fan of doing this in javascript. How about rather having a task in rust check the mouse movement and then send an event to the javascript "User is idle". Then the autominer can carry on from there. You could probably actually just do the whole start/stop mining in rust as well

So you would like to leave only switching auto mining state in javascript and rest of the current logic move to rust ?

Copy link
Contributor

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

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

tested and working

@stringhandler stringhandler merged commit 7d53aa1 into tari-project:main Aug 9, 2024
5 checks passed
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.

3 participants