mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 07:23:03 +00:00
Search via index: whole words only
This commit is contained in:
parent
03ee5ee426
commit
6f4509822f
3 changed files with 18 additions and 1 deletions
|
@ -105,6 +105,7 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
|||
ImageButton ibInvite = dview.findViewById(R.id.ibInvite);
|
||||
ImageButton ibAttachment = dview.findViewById(R.id.ibAttachment);
|
||||
ImageButton ibNotes = dview.findViewById(R.id.ibNotes);
|
||||
TextView tvHintFts = dview.findViewById(R.id.tvHintFts);
|
||||
ibMore = dview.findViewById(R.id.ibMore);
|
||||
tvMore = dview.findViewById(R.id.tvMore);
|
||||
CheckBox cbSearchIndex = dview.findViewById(R.id.cbSearchIndex);
|
||||
|
@ -252,6 +253,8 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
|||
}
|
||||
});
|
||||
|
||||
tvHintFts.setVisibility(last_fts && fts && pro ? View.VISIBLE : View.GONE);
|
||||
|
||||
View.OnClickListener onMore = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -288,6 +291,7 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
|||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
prefs.edit().putBoolean("last_fts", isChecked).apply();
|
||||
tvHintFts.setVisibility(isChecked && fts && pro ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -207,6 +207,18 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnSearch1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHintFts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/title_search_hint_fts"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="italic"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHint" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/ibMore"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -215,7 +227,7 @@
|
|||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:padding="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHint"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHintFts"
|
||||
app:srcCompat="@drawable/expander" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -1767,6 +1767,7 @@
|
|||
Initially, the search is performed on the device.
|
||||
To search the server too, tap the \'search again\' button.
|
||||
</string>
|
||||
<string name="title_search_hint_fts">Search via index: whole words only</string>
|
||||
<string name="title_search_index_hint">Searching via the search index is fast, but only finds whole words.</string>
|
||||
<string name="title_search_text_hint">Searching for text in messages, when there are a large number of messages, might not work on some servers</string>
|
||||
<string name="title_search_text_unsupported">\'%s\' means that the mail server doesn\'t support searching in message texts</string>
|
||||
|
|
Loading…
Reference in a new issue