Added hint text

This commit is contained in:
M66B 2022-04-23 14:09:58 +02:00
parent 8f12a20041
commit 2e9275c7bd
4 changed files with 31 additions and 0 deletions

View File

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

View File

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

View File

@ -337,6 +337,21 @@
app:layout_constraintStart_toStartOf="parent"
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
android:id="@+id/ibSchedules"
android:layout_width="wrap_content"

View File

@ -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_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_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_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>