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

FZ: can't drag elevated warning is shown every hour instead of of once per launch #1794

Conversation

yuyoyuppe
Copy link
Collaborator

Summary of the Pull Request

  • can't drag elevated warning is shown every hour instead of of once per launch
  • reorder some checks to improve performance

PR Checklist

Validation Steps Performed

  • checked that it works using MSIX

Copy link
Contributor

@ivan100sic ivan100sic left a comment

Choose a reason for hiding this comment

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

The code looks good but I didn't test it yet, I'll try to set it to 1 minute to see how it works.

static std::time_t warning_shown_at = 0;
constexpr int64_t warning_cooldown_interval_minutes = 60;
const auto now = timeutil::now();
const bool warning_ready = timeutil::diff::in_minutes(now, warning_shown_at) > warning_cooldown_interval_minutes;
Copy link
Contributor

Choose a reason for hiding this comment

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

This will actually take 61 minutes :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we have to fire yuyoyuppe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should create a separate task for it, since it's not a one-minute issue.

@enricogior
Copy link
Contributor

Let's wait before merging this.

Copy link

@timpetroclio timpetroclio left a comment

Choose a reason for hiding this comment

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

It works

@enricogior
Copy link
Contributor

Let's close this one for now, but please keep the branch since we may revisit it later on.

@enricogior enricogior closed this Apr 14, 2020
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