Small improment/fix

pull/178/head
M66B 5 years ago
parent a848bacf4f
commit e4add1e049

@ -77,6 +77,7 @@ public class FragmentFolder extends FragmentBase {
private ContentLoadingProgressBar pbWait;
private Group grpParent;
private Group grpPoll;
private Group grpAutoDelete;
private long id = -1;
private long account = -1;
@ -132,6 +133,7 @@ public class FragmentFolder extends FragmentBase {
pbWait = view.findViewById(R.id.pbWait);
grpParent = view.findViewById(R.id.grpParent);
grpPoll = view.findViewById(R.id.grpPoll);
grpAutoDelete = view.findViewById(R.id.grpAutoDelete);
btnColor.setOnClickListener(new View.OnClickListener() {
@Override
@ -204,7 +206,7 @@ public class FragmentFolder extends FragmentBase {
tvParent.setText(parent);
grpParent.setVisibility(parent == null ? View.GONE : View.VISIBLE);
Helper.setViewsEnabled(view, false);
cbAutoDelete.setVisibility(View.GONE);
grpAutoDelete.setVisibility(View.GONE);
btnSave.setEnabled(false);
pbSave.setVisibility(View.GONE);
pbWait.setVisibility(View.VISIBLE);
@ -260,13 +262,13 @@ public class FragmentFolder extends FragmentBase {
else
etKeepDays.setText(Integer.toString(folder == null ? EntityFolder.DEFAULT_KEEP : folder.keep_days));
if (folder == null || folder.read_only)
cbAutoDelete.setVisibility(View.GONE);
if (folder != null && folder.read_only)
grpAutoDelete.setVisibility(View.GONE);
else {
cbAutoDelete.setText(EntityFolder.TRASH.equals(folder.type)
cbAutoDelete.setText(folder != null && EntityFolder.TRASH.equals(folder.type)
? R.string.title_auto_delete : R.string.title_auto_trash);
cbAutoDelete.setChecked(folder.auto_delete);
cbAutoDelete.setVisibility(View.VISIBLE);
cbAutoDelete.setChecked(folder != null && folder.auto_delete);
grpAutoDelete.setVisibility(View.VISIBLE);
}
}

@ -347,5 +347,11 @@
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="etPoll,tvMultiply,tvPoll" />
<androidx.constraintlayout.widget.Group
android:id="@+id/grpAutoDelete"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="cbAutoDelete,tvAutoDeleteHint" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>

Loading…
Cancel
Save