Inline getAttachmentFileIntent()

This commit is contained in:
Sebastian Kürten
2020-12-03 11:59:51 +01:00
committed by Torsten Grote
parent 43c6ae4258
commit 15021bffef

View File

@@ -115,19 +115,15 @@ public class TextAttachmentController extends TextSendController
builder.show(); builder.show();
return; return;
} }
Intent intent = getAttachFileIntent(); Intent intent = UiUtils.createSelectImageIntent(true);
if (attachmentListener.getLifecycle().getCurrentState() != DESTROYED) { if (attachmentListener.getLifecycle().getCurrentState() != DESTROYED) {
attachmentListener.onAttachImage(intent); attachmentListener.onAttachImage(intent);
} }
} }
private Intent getAttachFileIntent() {
return UiUtils.createSelectImageIntent(true);
}
/** /**
* This is called with the result Intent * This is called with the result Intent returned by the Activity started
* returned by the Activity started with {@link #getAttachFileIntent()}. * with {@link UiUtils#createSelectImageIntent(boolean)}.
* <p> * <p>
* This method must be called at most once per call to * This method must be called at most once per call to
* {@link AttachmentListener#onAttachImage(Intent)}. * {@link AttachmentListener#onAttachImage(Intent)}.