mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Experiment: touched
This commit is contained in:
@@ -65,6 +65,7 @@ import java.util.List;
|
||||
|
||||
public class FragmentDialogSearch extends FragmentDialogBase {
|
||||
private static final int MAX_SUGGESTIONS = 3;
|
||||
private static final int RECENTLY_TOUCHED = 3600 * 1000; // milliseconds
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
@@ -613,6 +614,24 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
||||
ibUnseen.setOnClickListener(onClick);
|
||||
ibFlagged.setOnClickListener(onClick);
|
||||
|
||||
ibHidden.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
dialog.dismiss();
|
||||
|
||||
BoundaryCallbackMessages.SearchCriteria criteria = new BoundaryCallbackMessages.SearchCriteria();
|
||||
criteria.touched = RECENTLY_TOUCHED;
|
||||
|
||||
FragmentMessages.search(
|
||||
context, getViewLifecycleOwner(), getParentFragmentManager(),
|
||||
account, -1L,
|
||||
false,
|
||||
criteria);
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
etQuery.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||
if (actionId == EditorInfo.IME_ACTION_GO ||
|
||||
|
||||
Reference in New Issue
Block a user