Skip to content

Commit

Permalink
Fix an issue with sharing file attachments into the app.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal authored and alex-signal committed Oct 25, 2022
1 parent 738676e commit 9de6c44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -2052,7 +2052,7 @@ private void initializeViews(View view) {
inputPanel.setListener(this);
inputPanel.setMediaListener(this);

attachmentManager = new AttachmentManager(requireActivity(), this);
attachmentManager = new AttachmentManager(requireContext(), view, this);
audioRecorder = new AudioRecorder(requireContext());
typingTextWatcher = new ComposeTextWatcher();

Expand Down
Expand Up @@ -101,10 +101,10 @@ public class AttachmentManager {
private @NonNull Optional<Slide> slide = Optional.empty();
private @Nullable Uri captureUri;

public AttachmentManager(@NonNull Activity activity, @NonNull AttachmentListener listener) {
this.context = activity;
public AttachmentManager(@NonNull Context context, @NonNull View rootView, @NonNull AttachmentListener listener) {
this.context = context;
this.attachmentListener = listener;
this.attachmentViewStub = ViewUtil.findStubById(activity, R.id.attachment_editor_stub);
this.attachmentViewStub = ViewUtil.findStubById(rootView, R.id.attachment_editor_stub);
}

private void inflateStub() {
Expand Down

0 comments on commit 9de6c44

Please sign in to comment.