mirror of https://github.com/M66B/FairEmail.git
Made search index a pro feature
This commit is contained in:
parent
e8a7920dca
commit
6b67e3cf63
|
@ -73,7 +73,7 @@ All pro features are convenience or advanced features.
|
|||
* Reply templates
|
||||
* Accept/decline calendar invitations
|
||||
* Filter rules
|
||||
* Search on server
|
||||
* Search indexing, search on server
|
||||
* Keyword management
|
||||
* S/MIME sign/encrypt
|
||||
* Biometric authentication
|
||||
|
|
|
@ -92,7 +92,7 @@ All pro features are convenience or advanced features.
|
|||
* Reply templates
|
||||
* Accept/decline calendar invitations
|
||||
* Filter rules ([instructions](https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq71))
|
||||
* Search on server ([instructions](https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq13))
|
||||
* Search indexing, search on server ([instructions](https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq13))
|
||||
* Keyword management
|
||||
* S/MIME sign/encrypt
|
||||
* Biometric authentication ([instructions](https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq113))
|
||||
|
|
|
@ -187,7 +187,8 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean fts = prefs.getBoolean("fts", false);
|
||||
if (fts && seen == null && flagged == null && snoozed == null && encrypted == null) {
|
||||
boolean pro = ActivityBilling.isPro(context);
|
||||
if (fts && pro && seen == null && flagged == null && snoozed == null && encrypted == null) {
|
||||
if (state.ids == null) {
|
||||
SQLiteDatabase sdb = FtsDbHelper.getInstance(context);
|
||||
state.ids = FtsDbHelper.match(sdb, folder, query);
|
||||
|
|
|
@ -52,6 +52,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
private SwitchCompat swExternalSearch;
|
||||
private SwitchCompat swFts;
|
||||
private TextView tvFtsIndexed;
|
||||
private TextView tvFtsPro;
|
||||
private SwitchCompat swEnglish;
|
||||
private SwitchCompat swWatchdog;
|
||||
private SwitchCompat swUpdates;
|
||||
|
@ -95,6 +96,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
swExternalSearch = view.findViewById(R.id.swExternalSearch);
|
||||
swFts = view.findViewById(R.id.swFts);
|
||||
tvFtsIndexed = view.findViewById(R.id.tvFtsIndexed);
|
||||
tvFtsPro = view.findViewById(R.id.tvFtsPro);
|
||||
swEnglish = view.findViewById(R.id.swEnglish);
|
||||
swWatchdog = view.findViewById(R.id.swWatchdog);
|
||||
swUpdates = view.findViewById(R.id.swUpdates);
|
||||
|
@ -165,6 +167,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
}
|
||||
});
|
||||
|
||||
Helper.linkPro(tvFtsPro);
|
||||
|
||||
swEnglish.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
|
|
|
@ -110,7 +110,8 @@ public class WorkerFts extends Worker {
|
|||
try {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean fts = prefs.getBoolean("fts", true);
|
||||
if (fts) {
|
||||
boolean pro = ActivityBilling.isPro(context);
|
||||
if (fts && pro) {
|
||||
Log.i("Queuing " + getName());
|
||||
|
||||
OneTimeWorkRequest.Builder builder = new OneTimeWorkRequest.Builder(WorkerFts.class);
|
||||
|
|
|
@ -60,6 +60,17 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFtsHint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFtsPro"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/title_pro_feature"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?android:attr/textColorLink"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFtsIndexed" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swEnglish"
|
||||
android:layout_width="0dp"
|
||||
|
@ -68,7 +79,7 @@
|
|||
android:text="@string/title_advanced_english"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFtsIndexed"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFtsPro"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -73,7 +73,7 @@ All pro features are convenience or advanced features.
|
|||
* Reply templates
|
||||
* Accept/decline calendar invitations
|
||||
* Filter rules
|
||||
* Search on server
|
||||
* Search indexing, search on server
|
||||
* Keyword management
|
||||
* S/MIME sign/encrypt
|
||||
* Biometric authentication
|
||||
|
|
Loading…
Reference in New Issue