| 8 | #include <JuceHeader.h> |
| 9 | |
| 10 | class UpdateCheck |
| 11 | : public Component |
| 12 | , public Timer |
| 13 | { |
| 14 | public: |
| 15 | UpdateCheck(); |
| 16 | |
| 17 | void resized() override; |
| 18 | |
| 19 | void paint(Graphics& g) override; |
| 20 | |
| 21 | void timerCallback() override; |
| 22 | |
| 23 | void checkForUpdate(bool inShowNotificationOnLatestVersion); |
| 24 | |
| 25 | private: |
| 26 | void _showNewVersionAvailableNotification(); |
| 27 | |
| 28 | void _showOnLatestVersionNotification(); |
| 29 | |
| 30 | void _hideNotification(); |
| 31 | |
| 32 | bool mUpdateAvailable {false}; |
| 33 | |
| 34 | HyperlinkButton mUrlButton; |
| 35 | |
| 36 | Time mHideTime; |
| 37 | |
| 38 | static constexpr int mPadding = 5; |
| 39 | |
| 40 | static constexpr double mNotificationDurationSeconds = 10.0f; |
| 41 | static constexpr double mTimeIncrementOnMouseOverSeconds = 3.0f; |
| 42 | |
| 43 | const URL mLatestReleaseUrl {"https://github.com/DamRsn/NeuralNote/releases/latest"}; |
| 44 | }; |
| 45 | |
| 46 | #endif //UPDATECHECK_H |
nothing calls this directly
no outgoing calls
no test coverage detected