mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 18:30:20 +01:00
Add 'detailed' conversation style to show full file names.
Fixes #12442 Closes #12463
This commit is contained in:
committed by
Greyson Parrelli
parent
cdb7f07368
commit
c131fb500d
@@ -90,7 +90,8 @@ public class DocumentView extends FrameLayout {
|
||||
}
|
||||
|
||||
public void setDocument(final @NonNull Slide documentSlide,
|
||||
final boolean showControls)
|
||||
final boolean showControls,
|
||||
final boolean showSingleLineFilename)
|
||||
{
|
||||
if (showControls && documentSlide.isPendingDownload()) {
|
||||
controlToggle.displayQuick(downloadButton);
|
||||
@@ -106,6 +107,11 @@ public class DocumentView extends FrameLayout {
|
||||
|
||||
this.documentSlide = documentSlide;
|
||||
|
||||
// Android OS filenames are limited to 256 characters, so
|
||||
// we don't need an additional max characters/lines constraint when
|
||||
// [showSingleLineFilename] is false.
|
||||
this.fileName.setSingleLine(showSingleLineFilename);
|
||||
|
||||
this.fileName.setText(OptionalUtil.or(documentSlide.getFileName(),
|
||||
documentSlide.getCaption())
|
||||
.orElse(getContext().getString(R.string.DocumentView_unnamed_file)));
|
||||
@@ -114,6 +120,12 @@ public class DocumentView extends FrameLayout {
|
||||
this.setOnClickListener(new OpenClickedListener(documentSlide));
|
||||
}
|
||||
|
||||
public void setDocument(final @NonNull Slide documentSlide,
|
||||
final boolean showControls)
|
||||
{
|
||||
setDocument(documentSlide, showControls, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFocusable(boolean focusable) {
|
||||
super.setFocusable(focusable);
|
||||
|
||||
Reference in New Issue
Block a user