mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-18 18:51:26 +00:00
refactored UpdateReminderComponent.Builder to Factory
This commit is contained in:
@@ -57,8 +57,8 @@ abstract class FxApplicationModule {
|
||||
|
||||
@Provides
|
||||
@FxApplicationScoped
|
||||
static UpdateReminderComponent provideUpdateReminderComponent(UpdateReminderComponent.Builder builder) {
|
||||
return builder.build();
|
||||
static UpdateReminderComponent provideUpdateReminderComponent(UpdateReminderComponent.Factory factory) {
|
||||
return factory.create();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class FxApplicationWindows {
|
||||
private final Lazy<PreferencesComponent> preferencesWindow;
|
||||
private final QuitComponent.Builder quitWindowBuilder;
|
||||
private final UnlockComponent.Factory unlockWorkflowFactory;
|
||||
private final UpdateReminderComponent.Builder updateReminderWindowBuilder;
|
||||
private final UpdateReminderComponent.Factory updateReminderWindowBuilder;
|
||||
private final LockComponent.Factory lockWorkflowFactory;
|
||||
private final ErrorComponent.Factory errorWindowFactory;
|
||||
private final ExecutorService executor;
|
||||
@@ -60,7 +60,7 @@ public class FxApplicationWindows {
|
||||
Lazy<PreferencesComponent> preferencesWindow, //
|
||||
QuitComponent.Builder quitWindowBuilder, //
|
||||
UnlockComponent.Factory unlockWorkflowFactory, //
|
||||
UpdateReminderComponent.Builder updateReminderWindowBuilder, //
|
||||
UpdateReminderComponent.Factory updateReminderWindowBuilder, //
|
||||
LockComponent.Factory lockWorkflowFactory, //
|
||||
ErrorComponent.Factory errorWindowFactory, //
|
||||
VaultOptionsComponent.Factory vaultOptionsWindow, //
|
||||
@@ -131,7 +131,7 @@ public class FxApplicationWindows {
|
||||
}
|
||||
|
||||
public void showUpdateReminderWindow() {
|
||||
CompletableFuture.runAsync(() -> updateReminderWindowBuilder.build().showUpdateReminderWindow(), Platform::runLater);
|
||||
CompletableFuture.runAsync(() -> updateReminderWindowBuilder.create().showUpdateReminderWindow(), Platform::runLater);
|
||||
}
|
||||
|
||||
public CompletionStage<Void> startUnlockWorkflow(Vault vault, @Nullable Stage owner) {
|
||||
|
||||
@@ -25,8 +25,8 @@ public interface UpdateReminderComponent {
|
||||
stage.show();
|
||||
}
|
||||
|
||||
@Subcomponent.Builder
|
||||
interface Builder {
|
||||
UpdateReminderComponent build();
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
UpdateReminderComponent create();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user