use of com.faforever.client.notification.ImmediateNotification in project downlords-faf-client by FAForever.
the class MapVaultController method onLoadMoreButtonClicked.
public void onLoadMoreButtonClicked() {
moreButton.setVisible(false);
loadingLabel.setVisible(true);
currentSupplier.get().thenAccept(maps -> {
appendSearchResult(maps, searchResultPane);
enterSearchResultState();
}).exceptionally(e -> {
notificationService.addNotification(new ImmediateNotification(i18n.get("errorTitle"), i18n.get("vault.replays.searchError"), Severity.ERROR, e, Collections.singletonList(new DismissAction(i18n))));
enterShowroomState();
return null;
});
}
use of com.faforever.client.notification.ImmediateNotification in project downlords-faf-client by FAForever.
the class ModDetailController method onUninstallButtonClicked.
public void onUninstallButtonClicked() {
progressBar.progressProperty().unbind();
progressBar.setProgress(-1);
uninstallButton.setVisible(false);
modService.uninstallMod(modVersion).exceptionally(throwable -> {
notificationService.addNotification(new ImmediateNotification(i18n.get("errorTitle"), i18n.get("modVault.couldNotDeleteMod", modVersion.getDisplayName(), throwable.getLocalizedMessage()), Severity.ERROR, throwable, singletonList(new ReportAction(i18n, reportingService, throwable))));
return null;
});
}
use of com.faforever.client.notification.ImmediateNotification in project downlords-faf-client by FAForever.
the class MapDetailController method onUninstallButtonClicked.
public void onUninstallButtonClicked() {
progressBar.progressProperty().unbind();
progressBar.setProgress(-1);
uninstallButton.setVisible(false);
mapService.uninstallMap(map).thenRun(() -> setInstalled(false)).exceptionally(throwable -> {
notificationService.addNotification(new ImmediateNotification(i18n.get("errorTitle"), i18n.get("mapVault.couldNotDeleteMap", map.getDisplayName(), throwable.getLocalizedMessage()), Severity.ERROR, throwable, singletonList(new ReportAction(i18n, reportingService, throwable))));
setInstalled(true);
return null;
});
}
use of com.faforever.client.notification.ImmediateNotification in project downlords-faf-client by FAForever.
the class ModVaultController method displayModsFromSupplier.
private void displayModsFromSupplier(Supplier<CompletableFuture<List<ModVersion>>> modsSupplier) {
this.currentSupplier = modsSupplier;
modsSupplier.get().thenAccept(this::displayMods).exceptionally(e -> {
notificationService.addNotification(new ImmediateNotification(i18n.get("errorTitle"), i18n.get("vault.replays.searchError"), Severity.ERROR, e, Collections.singletonList(new DismissAction(i18n))));
enterShowroomState();
return null;
});
}
use of com.faforever.client.notification.ImmediateNotification in project downlords-faf-client by FAForever.
the class ModVaultController method onRefreshButtonClicked.
public void onRefreshButtonClicked() {
modService.evictCache();
switch(state) {
case SHOWROOM:
displayShowroomMods();
break;
case SEARCH_RESULT:
currentPage--;
currentSupplier.get().thenAccept(this::displayMods).exceptionally(e -> {
notificationService.addNotification(new ImmediateNotification(i18n.get("errorTitle"), i18n.get("vault.mods.searchError"), Severity.ERROR, e, Collections.singletonList(new DismissAction(i18n))));
enterShowroomState();
return null;
});
break;
default:
}
}
Aggregations