|
|
@ -1525,6 +1525,7 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
ownerAttachment = new TwoStateOwner(getViewLifecycleOwner(), "attachments");
|
|
|
|
ownerAttachment = new TwoStateOwner(getViewLifecycleOwner(), "attachments");
|
|
|
|
ownerAttachment.start();
|
|
|
|
ownerAttachment.start();
|
|
|
|
|
|
|
|
ibExpanderAttachments.setTag(prefs.getBoolean("compose_hide_attachments", false));
|
|
|
|
ibExpanderAttachments.setVisibility(View.GONE);
|
|
|
|
ibExpanderAttachments.setVisibility(View.GONE);
|
|
|
|
ibExpanderAttachments.setOnClickListener(new View.OnClickListener() {
|
|
|
|
ibExpanderAttachments.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -1535,6 +1536,17 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
ownerAttachment.restart();
|
|
|
|
ownerAttachment.restart();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
ibExpanderAttachments.setOnLongClickListener(new View.OnLongClickListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean onLongClick(View v) {
|
|
|
|
|
|
|
|
boolean hide_attachments = !Boolean.TRUE.equals(ibExpanderAttachments.getTag());
|
|
|
|
|
|
|
|
ibExpanderAttachments.setTag(hide_attachments);
|
|
|
|
|
|
|
|
ibExpanderAttachments.setImageLevel(hide_attachments ? 1 /* more */ : 0 /* less */);
|
|
|
|
|
|
|
|
ownerAttachment.restart();
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("compose_hide_attachments", hide_attachments).apply();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
tvAttachments.setVisibility(View.GONE);
|
|
|
|
tvAttachments.setVisibility(View.GONE);
|
|
|
|
|
|
|
|
|
|
|
|