mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ui] exact check for update timestamp in tooltip
This commit is contained in:
+4
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -120,11 +120,7 @@ object UpdateChecker {
|
||||
indicator?.text = IdeBundle.message("updates.checking.platform")
|
||||
|
||||
val result = checkPlatformUpdate(updateSettings)
|
||||
|
||||
if (manualCheck && result.state == UpdateStrategy.State.LOADED) {
|
||||
UpdateSettings.getInstance().saveLastCheckedInfo()
|
||||
}
|
||||
else if (result.state == UpdateStrategy.State.CONNECTION_ERROR) {
|
||||
if (result.state == UpdateStrategy.State.CONNECTION_ERROR) {
|
||||
val e = result.error
|
||||
if (e != null) LOG.debug(e)
|
||||
showErrorMessage(manualCheck, IdeBundle.message("updates.error.connection.failed", e?.message ?: "internal error"))
|
||||
@@ -151,6 +147,8 @@ object UpdateChecker {
|
||||
|
||||
// show result
|
||||
|
||||
UpdateSettings.getInstance().saveLastCheckedInfo()
|
||||
|
||||
ApplicationManager.getApplication().invokeLater({
|
||||
showUpdateResult(project, result, updateSettings, updatedPlugins, incompatiblePlugins, externalUpdates, !fromSettings, manualCheck)
|
||||
callback?.setDone()
|
||||
|
||||
+8
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -210,7 +210,13 @@ public class UpdateSettingsConfigurable extends BaseConfigurable implements Sear
|
||||
|
||||
private void updateLastCheckedLabel() {
|
||||
long time = mySettings.getLastTimeChecked();
|
||||
myLastCheckedDate.setText(time == 0 ? IdeBundle.message("updates.last.check.never") : DateFormatUtil.formatPrettyDateTime(time));
|
||||
if (time <= 0) {
|
||||
myLastCheckedDate.setText(IdeBundle.message("updates.last.check.never"));
|
||||
}
|
||||
else {
|
||||
myLastCheckedDate.setText(DateFormatUtil.formatPrettyDateTime(time));
|
||||
myLastCheckedDate.setToolTipText(DateFormatUtil.formatDate(time) + ' ' + DateFormatUtil.formatTimeWithSeconds(time));
|
||||
}
|
||||
}
|
||||
|
||||
public ChannelStatus getSelectedChannelType() {
|
||||
|
||||
Reference in New Issue
Block a user