mirror of https://github.com/M66B/FairEmail.git
Search: small behavior improvement
This commit is contained in:
parent
fd6ff59280
commit
65e3d6bdfb
|
@ -238,7 +238,6 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
|||
cbHtml.setVisibility(View.GONE);
|
||||
cbSearchTrash.setVisibility(View.GONE);
|
||||
cbSearchJunk.setVisibility(View.GONE);
|
||||
cbSearchDevice.setVisibility(View.GONE);
|
||||
} else {
|
||||
ibMore.setImageLevel(0);
|
||||
grpMore.setVisibility(View.VISIBLE);
|
||||
|
@ -250,8 +249,6 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
|||
cbSearchTrash.setVisibility(View.VISIBLE);
|
||||
cbSearchJunk.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (account > 0 && folder > 0)
|
||||
cbSearchDevice.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -376,13 +373,13 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
|||
tvAfter.setText(null);
|
||||
tvBefore.setText(null);
|
||||
cbSearchDevice.setChecked(last_search_device);
|
||||
cbSearchDevice.setEnabled(account > 0 && folder > 0);
|
||||
|
||||
grpMore.setVisibility(View.GONE);
|
||||
cbHeaders.setVisibility(View.GONE);
|
||||
cbHtml.setVisibility(View.GONE);
|
||||
cbSearchTrash.setVisibility(View.GONE);
|
||||
cbSearchJunk.setVisibility(View.GONE);
|
||||
cbSearchDevice.setVisibility(View.GONE);
|
||||
|
||||
final AlertDialog dialog = new AlertDialog.Builder(context)
|
||||
.setView(dview)
|
||||
|
@ -429,7 +426,7 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
|||
if (before != null)
|
||||
criteria.before = ((Calendar) before).getTimeInMillis();
|
||||
|
||||
boolean device = (cbSearchDevice.isChecked() || account < 0 || folder < 0);
|
||||
boolean device = (cbSearchDevice.isChecked() || !cbSearchDevice.isEnabled());
|
||||
|
||||
if (criteria.query != null) {
|
||||
List<String> searches = new ArrayList<>();
|
||||
|
@ -527,7 +524,7 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
|||
else if (id == R.id.ibNotes)
|
||||
criteria.with_notes = true;
|
||||
|
||||
boolean device = (cbSearchDevice.isChecked() || account < 0 || folder < 0);
|
||||
boolean device = (cbSearchDevice.isChecked() || !cbSearchDevice.isEnabled());
|
||||
|
||||
FragmentMessages.search(
|
||||
context, getViewLifecycleOwner(), getParentFragmentManager(),
|
||||
|
|
|
@ -559,6 +559,6 @@
|
|||
app:constraint_referenced_ids="
|
||||
cbSearchIndex,tvSearchIndexHint,cbSenders,cbRecipients,cbSubject,cbKeywords,cbMessage,tvSearchTextHint,tvSearchTextUnsupported,cbNotes,
|
||||
tvAnd,cbUnseen,cbFlagged,cbHidden,cbEncrypted,cbAttachments,
|
||||
btnAfter,btnBefore,tvBefore,tvAfter" />
|
||||
btnAfter,btnBefore,tvBefore,tvAfter,cbSearchDevice" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ScrollViewEx>
|
||||
|
|
Loading…
Reference in New Issue