Small a11y improvement

pull/172/head
M66B 5 years ago
parent afb4ac669d
commit 77960b9f6f

@ -3884,19 +3884,19 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (message.attachments > 0)
result.add(context.getString(R.string.title_accessibility_attachment));
// For a11y purpose report addresses first in case of incoming message
boolean outgoing = isOutgoing(message);
if (!outgoing || message.count > 1)
result.add(tvFrom.getText().toString());
else
Address[] addresses = (outgoing && (viewType != ViewType.THREAD || !threading) ? message.to : message.senders);
String from = MessageHelper.formatAddresses(addresses, name_email, false);
// For a11y purpose subject is reported first when: user wishes so or this is a single outgoing message
if (subject_top || (outgoing && message.visible == 1)) {
result.add(message.subject); // Don't want to ellipsize for a11y
result.add(tvTime.getText().toString());
if (outgoing && message.count == 1)
result.add(tvFrom.getText().toString());
else
result.add(tvTime.getText().toString());
result.add(from);
} else {
result.add(from);
result.add(tvTime.getText().toString());
result.add(message.subject);
}
if (message.encrypted > 0)
result.add(context.getString(R.string.title_legend_encrypted));

@ -57,7 +57,7 @@ public class WorkerPoll extends Worker {
int pollInterval = prefs.getInt("poll_interval", 0);
if (enabled && pollInterval > 0) {
int min = (int) (new Date().getTime() / (60 * 1000L));
int delay = pollInterval - min % pollInterval;
int delay = pollInterval - (min % pollInterval) + pollInterval;
Log.i("Queuing " + getName() + " every " + pollInterval + " minutes delay=" + delay);
PeriodicWorkRequest workRequest =

Loading…
Cancel
Save