Added hint text

pull/207/head
M66B 3 years ago
parent 8f12a20041
commit 2e9275c7bd

@ -22,6 +22,7 @@ package eu.faircode.email;
import android.app.Dialog; import android.app.Dialog;
import android.app.TimePickerDialog; import android.app.TimePickerDialog;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
@ -48,6 +49,7 @@ import androidx.fragment.app.DialogFragment;
import androidx.lifecycle.Lifecycle; import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner; import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.preference.PreferenceManager; import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.DiffUtil; import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
@ -72,6 +74,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
private TextView tvScheduleStart; private TextView tvScheduleStart;
private TextView tvScheduleEnd; private TextView tvScheduleEnd;
private CheckBox[] cbDay; private CheckBox[] cbDay;
private TextView tvScheduleIgnore;
private ImageButton ibSchedules; private ImageButton ibSchedules;
private SwitchCompat swQuickSyncImap; private SwitchCompat swQuickSyncImap;
@ -146,6 +149,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
view.findViewById(R.id.cbDay5), view.findViewById(R.id.cbDay5),
view.findViewById(R.id.cbDay6) view.findViewById(R.id.cbDay6)
}; };
tvScheduleIgnore = view.findViewById(R.id.tvScheduleIgnore);
ibSchedules = view.findViewById(R.id.ibSchedules); ibSchedules = view.findViewById(R.id.ibSchedules);
swQuickSyncImap = view.findViewById(R.id.swQuickSyncImap); swQuickSyncImap = view.findViewById(R.id.swQuickSyncImap);
@ -278,6 +282,14 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
}); });
} }
tvScheduleIgnore.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(v.getContext());
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_VIEW_ACCOUNTS));
}
});
ibSchedules.setOnClickListener(new View.OnClickListener() { ibSchedules.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

@ -2128,10 +2128,12 @@ public class Log {
} }
boolean unmetered = false; boolean unmetered = false;
boolean ignore_schedule = false;
try { try {
if (account.conditions != null) { if (account.conditions != null) {
JSONObject jconditions = new JSONObject(account.conditions); JSONObject jconditions = new JSONObject(account.conditions);
unmetered = jconditions.optBoolean("unmetered"); unmetered = jconditions.optBoolean("unmetered");
ignore_schedule = jconditions.optBoolean("ignore_schedule");
} }
} catch (Throwable ignored) { } catch (Throwable ignored) {
} }
@ -2145,6 +2147,7 @@ public class Log {
" ondemand=" + account.ondemand + " ondemand=" + account.ondemand +
" msgs=" + content + "/" + messages + " msgs=" + content + "/" + messages +
" ops=" + db.operation().getOperationCount(account.id) + " ops=" + db.operation().getOperationCount(account.id) +
" ischedule=" + ignore_schedule + (ignore_schedule ? " !!!" : "") +
" unmetered=" + unmetered + (unmetered ? " !!!" : "") + " unmetered=" + unmetered + (unmetered ? " !!!" : "") +
" " + account.state + " " + account.state +
(account.last_connected == null ? "" : " " + dtf.format(account.last_connected)) + (account.last_connected == null ? "" : " " + dtf.format(account.last_connected)) +

@ -337,6 +337,21 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDay5" /> app:layout_constraintTop_toBottomOf="@id/cbDay5" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvScheduleIgnore"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginEnd="12dp"
android:drawableEnd="@drawable/twotone_settings_24"
android:drawablePadding="6dp"
android:text="@string/title_advanced_schedule_ignore"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDay6" />
<eu.faircode.email.FixedImageButton <eu.faircode.email.FixedImageButton
android:id="@+id/ibSchedules" android:id="@+id/ibSchedules"
android:layout_width="wrap_content" android:layout_width="wrap_content"

@ -770,6 +770,7 @@
<string name="title_advanced_poll_hint">Periodically checking for new messages will compare local and remote messages every time, which is an expensive operation that may result in extra battery usage, especially if there are a lot of messages. Always receive will prevent this by continuously following changes.</string> <string name="title_advanced_poll_hint">Periodically checking for new messages will compare local and remote messages every time, which is an expensive operation that may result in extra battery usage, especially if there are a lot of messages. Always receive will prevent this by continuously following changes.</string>
<string name="title_advanced_optimize_hint">This might change the sync frequency to save battery usage depending on the capabilities and behavior of the email servers</string> <string name="title_advanced_optimize_hint">This might change the sync frequency to save battery usage depending on the capabilities and behavior of the email servers</string>
<string name="title_advanced_schedule_hint">Tap on a time to set a time</string> <string name="title_advanced_schedule_hint">Tap on a time to set a time</string>
<string name="title_advanced_schedule_ignore">Schedules can be disabled in the advanced account settings</string>
<string name="title_advanced_quick_sync_hint">This reduces data usage, but new messages might be missed if the email server doesn\'t follow the standards</string> <string name="title_advanced_quick_sync_hint">This reduces data usage, but new messages might be missed if the email server doesn\'t follow the standards</string>
<string name="title_advanced_no_date_hint">Some providers store messages with an unknown, invalid or future date as messages without date</string> <string name="title_advanced_no_date_hint">Some providers store messages with an unknown, invalid or future date as messages without date</string>
<string name="title_advanced_unseen_hint">Some providers don\'t support this properly, which may cause synchronizing none or all messages</string> <string name="title_advanced_unseen_hint">Some providers don\'t support this properly, which may cause synchronizing none or all messages</string>

Loading…
Cancel
Save