use of com.faforever.client.notification.DismissAction in project downlords-faf-client by FAForever.
the class MapVaultController method displayMapsFromSupplier.
private void displayMapsFromSupplier(Supplier<CompletableFuture<List<MapBean>>> mapsSupplier) {
currentPage = 0;
this.currentSupplier = mapsSupplier;
mapsSupplier.get().thenAccept(this::displayMaps).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.DismissAction in project downlords-faf-client by FAForever.
the class ModVaultController method onLoadMoreButtonClicked.
public void onLoadMoreButtonClicked() {
moreButton.setVisible(false);
loadingLabel.setVisible(true);
currentSupplier.get().thenAccept(mods -> {
appendSearchResult(mods, searchResultPane);
enterSearchResultState();
}).exceptionally(e -> {
notificationService.addNotification(new ImmediateNotification(i18n.get("errorTitle"), i18n.get("vault.mod.searchError"), Severity.ERROR, e, Collections.singletonList(new DismissAction(i18n))));
enterShowroomState();
return null;
});
}
Aggregations