]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/helper/AttachmentHelper.java
Refactor Context to create helpers lazily
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / helper / AttachmentHelper.java
index 4944c7b328a297d4b933536d808ef6347becdf88..223226da76b6499d11bd22b7f0c55e89126c4804 100644 (file)
@@ -29,11 +29,9 @@ public class AttachmentHelper {
     private final SignalDependencies dependencies;
     private final AttachmentStore attachmentStore;
 
-    public AttachmentHelper(
-            final SignalDependencies dependencies, final AttachmentStore attachmentStore
-    ) {
-        this.dependencies = dependencies;
-        this.attachmentStore = attachmentStore;
+    public AttachmentHelper(final Context context) {
+        this.dependencies = context.getDependencies();
+        this.attachmentStore = context.getAttachmentStore();
     }
 
     public File getAttachmentFile(SignalServiceAttachmentRemoteId attachmentId) {