mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
Add a mechanism to control if automatic updates can start
For now they won't start if the user is editing comics information.
This commit is contained in:
@ -11,7 +11,7 @@ class LibrariesUpdateCoordinator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LibrariesUpdateCoordinator(QSettings *settings, YACReaderLibraries &libraries, QObject *parent = 0);
|
||||
LibrariesUpdateCoordinator(QSettings *settings, YACReaderLibraries &libraries, const std::function<bool()> &canStartUpdateProvider, QObject *parent = 0);
|
||||
|
||||
void init();
|
||||
void updateLibraries();
|
||||
@ -37,6 +37,8 @@ private:
|
||||
std::future<void> updateFuture;
|
||||
bool canceled;
|
||||
std::weak_ptr<LibraryCreator> currentLibraryCreator;
|
||||
|
||||
std::function<bool()> canStartUpdateProvider;
|
||||
};
|
||||
|
||||
#endif // LIBRARIES_UPDATE_COORDINATOR_H
|
||||
|
Reference in New Issue
Block a user