Restart search after pausing
This commit is contained in:
parent
27aa4ae4a7
commit
566e2fe544
1 changed files with 7 additions and 0 deletions
|
@ -22,6 +22,7 @@ import android.support.v7.widget.Toolbar;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.text.style.ForegroundColorSpan;
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
@ -178,6 +179,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
||||||
|
|
||||||
private boolean newSearch;
|
private boolean newSearch;
|
||||||
private boolean interruptedSearch;
|
private boolean interruptedSearch;
|
||||||
|
private boolean pausedSearch;
|
||||||
private long hideTimeMs;
|
private long hideTimeMs;
|
||||||
private boolean expired;
|
private boolean expired;
|
||||||
private boolean poiFilterApplied;
|
private boolean poiFilterApplied;
|
||||||
|
@ -985,12 +987,17 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
||||||
}
|
}
|
||||||
expired = false;
|
expired = false;
|
||||||
paused = false;
|
paused = false;
|
||||||
|
if (pausedSearch && !TextUtils.isEmpty(searchQuery)) {
|
||||||
|
runSearch();
|
||||||
|
}
|
||||||
|
pausedSearch = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
paused = true;
|
paused = true;
|
||||||
|
pausedSearch = searching;
|
||||||
hideTimeMs = System.currentTimeMillis();
|
hideTimeMs = System.currentTimeMillis();
|
||||||
stopLocationUpdate();
|
stopLocationUpdate();
|
||||||
hideProgressBar();
|
hideProgressBar();
|
||||||
|
|
Loading…
Reference in a new issue