summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-09-17 07:46:25 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-05-19 03:43:23 +0200
commitdbab33f525e0ff45b8d4776e457b2024719d79e4 (patch)
tree4b3f1949045760253a2bed3beadc6cca84bf633d /desktop
parentonly check for updates once every 7 days (diff)
downloadcore-dbab33f525e0ff45b8d4776e457b2024719d79e4.tar.gz
core-dbab33f525e0ff45b8d4776e457b2024719d79e4.zip
update the last update check time
Change-Id: I4a664c5dca2fcefbea49e1e550e82d191ba358dd
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 871c28692899..402d78ffafeb 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1240,9 +1240,6 @@ void restartOnMac(bool passArguments) {
bool isTimeForUpdateCheck()
{
sal_uInt64 nLastUpdate = officecfg::Office::Update::Update::LastUpdateTime::get();
- if (nLastUpdate == 0)
- return true;
-
sal_uInt64 nNow = tools::Time::GetSystemTicks();
sal_uInt64 n7DayInMS = 1000 * 60 * 60 * 24 * 7; // 7 days in ms
@@ -1497,7 +1494,10 @@ int Desktop::Main()
if (isTimeForUpdateCheck())
{
sal_uInt64 nNow = tools::Time::GetSystemTicks();
- officecfg::Office::Update::Update::LastUpdateTime::set(nNow);
+ std::shared_ptr< comphelper::ConfigurationChanges > batch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Update::Update::LastUpdateTime::set(nNow, batch);
+ batch->commit();
m_aUpdateThread = std::thread(update_checker);
}
}