use of com.faforever.client.notification.Severity.WARN in project downlords-faf-client by FAForever.
the class ReplayServiceImpl method moveCorruptedReplayFile.
private void moveCorruptedReplayFile(Path replayFile) {
Path corruptedReplaysDirectory = preferencesService.getCorruptedReplaysDirectory();
noCatch(() -> createDirectories(corruptedReplaysDirectory));
Path target = corruptedReplaysDirectory.resolve(replayFile.getFileName());
logger.debug("Moving corrupted replay file from {} to {}", replayFile, target);
noCatch(() -> move(replayFile, target));
notificationService.addNotification(new PersistentNotification(i18n.get("corruptedReplayFiles.notification"), WARN, singletonList(new Action(i18n.get("corruptedReplayFiles.show"), event -> platformService.reveal(replayFile)))));
}
use of com.faforever.client.notification.Severity.WARN in project downlords-faf-client by FAForever.
the class ClientUpdateServiceImpl method downloadAndInstallInBackground.
private void downloadAndInstallInBackground(UpdateInfo updateInfo) {
DownloadUpdateTask task = applicationContext.getBean(DownloadUpdateTask.class);
task.setUpdateInfo(updateInfo);
taskService.submitTask(task).getFuture().thenAccept(this::install).exceptionally(throwable -> {
logger.warn("Error while downloading client update", throwable);
notificationService.addNotification(new PersistentNotification(i18n.get("clientUpdateDownloadFailed.notification"), WARN, singletonList(new Action(i18n.get("clientUpdateDownloadFailed.retry"), event -> downloadAndInstallInBackground(updateInfo)))));
return null;
});
}
Aggregations