mirror of https://github.com/M66B/FairEmail.git
Compare commits
7 Commits
4c350ebd8c
...
9787c379ef
Author | SHA1 | Date |
---|---|---|
M66B | 9787c379ef | |
M66B | 028ffba4ab | |
M66B | bddae1af77 | |
M66B | 4569ff5b2b | |
M66B | 26ee785be3 | |
M66B | 0ebfbc584c | |
M66B | 1bb28fc4e4 |
|
@ -7761,7 +7761,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
return tvBody.getText().subSequence(start, end);
|
||||
}
|
||||
|
||||
private View.AccessibilityDelegate accessibilityDelegateHeader = new View.AccessibilityDelegate() {
|
||||
private final View.AccessibilityDelegate accessibilityDelegateHeader = new View.AccessibilityDelegate() {
|
||||
@Override
|
||||
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
|
||||
super.onInitializeAccessibilityEvent(host, event);
|
||||
|
@ -7798,67 +7798,82 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
Log.e(ex);
|
||||
}
|
||||
|
||||
TupleMessageEx message = getMessage();
|
||||
if (message == null)
|
||||
return;
|
||||
try {
|
||||
TupleMessageEx message = getMessage();
|
||||
if (message == null)
|
||||
return;
|
||||
|
||||
boolean expanded = properties.getValue("expanded", message.id);
|
||||
boolean expanded = properties.getValue("expanded", message.id);
|
||||
|
||||
vwColor.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
vwColor.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
if (ibExpander.getVisibility() == View.VISIBLE)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibExpander,
|
||||
context.getString(expanded ? R.string.title_accessibility_collapse : R.string.title_accessibility_expand)));
|
||||
ibExpander.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
if (ibExpander.getVisibility() == View.VISIBLE)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibExpander,
|
||||
context.getString(expanded ? R.string.title_accessibility_collapse : R.string.title_accessibility_expand)));
|
||||
ibExpander.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibSeen,
|
||||
context.getString(message.ui_seen ? R.string.title_unseen : R.string.title_seen)));
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibSeen,
|
||||
context.getString(message.ui_seen ? R.string.title_unseen : R.string.title_seen)));
|
||||
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibAnswer,
|
||||
context.getString(R.string.title_reply)));
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibAnswer,
|
||||
context.getString(R.string.title_reply)));
|
||||
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibArchive,
|
||||
context.getString(R.string.title_archive)));
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibArchive,
|
||||
context.getString(R.string.title_archive)));
|
||||
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibTrash,
|
||||
context.getString(R.string.title_trash)));
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibTrash,
|
||||
context.getString(R.string.title_trash)));
|
||||
|
||||
if (properties.getSelectionCount() > 0)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibDelete,
|
||||
context.getString(R.string.title_trash_selection)));
|
||||
if (properties.getSelectionCount() > 0)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibDelete,
|
||||
context.getString(R.string.title_trash_selection)));
|
||||
|
||||
if (ibMove != null && ibMove.getVisibility() == View.VISIBLE && ibMove.isEnabled())
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibMove,
|
||||
context.getString(R.string.title_move_to)));
|
||||
if (ibAvatar != null) {
|
||||
if (ibAvatar.getVisibility() == View.VISIBLE && ibAvatar.isEnabled())
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibAvatar,
|
||||
context.getString(R.string.title_accessibility_view_contact)));
|
||||
ibAvatar.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
}
|
||||
|
||||
if (ibAvatar.getVisibility() == View.VISIBLE && ibAvatar.isEnabled())
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibAvatar,
|
||||
context.getString(R.string.title_accessibility_view_contact)));
|
||||
ibAvatar.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
if (ibFlagged != null) {
|
||||
if (ibFlagged.getVisibility() == View.VISIBLE && ibFlagged.isEnabled()) {
|
||||
int flagged = (message.count - message.unflagged);
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibFlagged,
|
||||
context.getString(flagged > 0 ? R.string.title_unflag : R.string.title_flag)));
|
||||
}
|
||||
ibFlagged.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
}
|
||||
|
||||
if (ibFlagged.getVisibility() == View.VISIBLE && ibFlagged.isEnabled()) {
|
||||
int flagged = (message.count - message.unflagged);
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibFlagged,
|
||||
context.getString(flagged > 0 ? R.string.title_unflag : R.string.title_flag)));
|
||||
if (ibAuth != null) {
|
||||
if (ibAuth.getVisibility() == View.VISIBLE)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibAuth,
|
||||
context.getString(R.string.title_accessibility_show_authentication_result)));
|
||||
ibAuth.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
}
|
||||
|
||||
if (ibSnoozed != null) {
|
||||
if (ibSnoozed.getVisibility() == View.VISIBLE)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibSnoozed,
|
||||
context.getString(R.string.title_accessibility_show_snooze_time)));
|
||||
ibSnoozed.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
}
|
||||
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibMore,
|
||||
context.getString(R.string.title_advanced_more)));
|
||||
if (ibMore != null)
|
||||
ibMore.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
if (ibError != null) {
|
||||
if (ibError.getVisibility() == View.VISIBLE)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibError,
|
||||
context.getString(R.string.title_accessibility_view_help)));
|
||||
ibError.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
}
|
||||
|
||||
info.setContentDescription(populateContentDescription(message));
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
ibFlagged.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
if (ibAuth.getVisibility() == View.VISIBLE)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibAuth,
|
||||
context.getString(R.string.title_accessibility_show_authentication_result)));
|
||||
ibAuth.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
if (ibSnoozed.getVisibility() == View.VISIBLE)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibSnoozed,
|
||||
context.getString(R.string.title_accessibility_show_snooze_time)));
|
||||
ibSnoozed.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
if (ibError.getVisibility() == View.VISIBLE)
|
||||
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(R.id.ibError,
|
||||
context.getString(R.string.title_accessibility_view_help)));
|
||||
ibError.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
info.setContentDescription(populateContentDescription(message));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -7897,6 +7912,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
} else if (action == R.id.ibSnoozed) {
|
||||
onShowSnoozed(message);
|
||||
return true;
|
||||
} else if (action == R.id.ibMore) {
|
||||
onActionMore(message);
|
||||
return true;
|
||||
} else if (action == R.id.ibError) {
|
||||
onHelp(message);
|
||||
return true;
|
||||
|
|
|
@ -891,6 +891,7 @@ public class DebugHelper {
|
|||
identity.display + " " + identity.email +
|
||||
(identity.self ? "" : " !self") +
|
||||
" [" + (identity.provider == null ? "" : identity.provider) +
|
||||
":" + identity.user +
|
||||
":" + ServiceAuthenticator.getAuthTypeName(identity.auth_type) + "]" +
|
||||
(TextUtils.isEmpty(identity.sender_extra_regex) ? "" : " regex=" + identity.sender_extra_regex) +
|
||||
(!identity.sender_extra ? "" : " edit" +
|
||||
|
|
|
@ -332,6 +332,10 @@ public class EmailService implements AutoCloseable {
|
|||
properties.put("mail." + protocol + ".ignorebodystructuresize", Boolean.toString(enabled));
|
||||
}
|
||||
|
||||
void setMailFrom(String address) {
|
||||
properties.put("mail." + protocol + ".from", address);
|
||||
}
|
||||
|
||||
void setSendPartial(boolean enabled) {
|
||||
properties.put("mail." + protocol + ".sendpartial", Boolean.toString(enabled));
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.ForeignKey;
|
||||
import androidx.room.Ignore;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
|
@ -62,6 +63,8 @@ public class EntityIdentity {
|
|||
public String name;
|
||||
@NonNull
|
||||
public String email;
|
||||
@Ignore
|
||||
public String envelopeFrom;
|
||||
@NonNull
|
||||
public Long account;
|
||||
public String display;
|
||||
|
|
|
@ -5932,6 +5932,7 @@ public class FragmentMessages extends FragmentBase
|
|||
|
||||
final Context context = getContext();
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean primary_inbox = "inbox".equals(prefs.getString("startup", "unified"));
|
||||
String sort = prefs.getString(getSort(context, viewType, type), "time");
|
||||
boolean ascending = prefs.getBoolean(getSortOrder(context, viewType, type), outbox);
|
||||
boolean filter_seen = prefs.getBoolean(getFilter(context, "seen", viewType, type), false);
|
||||
|
@ -6069,7 +6070,7 @@ public class FragmentMessages extends FragmentBase
|
|||
.setVisible(viewType == AdapterMessage.ViewType.THREAD);
|
||||
|
||||
menu.findItem(R.id.menu_compact).setChecked(compact);
|
||||
menu.findItem(R.id.menu_theme).setVisible(viewType == AdapterMessage.ViewType.UNIFIED);
|
||||
menu.findItem(R.id.menu_theme).setVisible(viewType == AdapterMessage.ViewType.UNIFIED || primary_inbox);
|
||||
|
||||
menu.findItem(R.id.menu_confirm_links)
|
||||
.setChecked(confirm_links)
|
||||
|
@ -6096,7 +6097,7 @@ public class FragmentMessages extends FragmentBase
|
|||
}
|
||||
|
||||
menu.findItem(R.id.menu_sync_more).setVisible(folder);
|
||||
menu.findItem(R.id.menu_force_sync).setVisible(viewType == AdapterMessage.ViewType.UNIFIED);
|
||||
menu.findItem(R.id.menu_force_sync).setVisible(viewType == AdapterMessage.ViewType.UNIFIED || primary_inbox);
|
||||
menu.findItem(R.id.menu_force_send).setVisible(outbox);
|
||||
|
||||
menu.findItem(R.id.menu_expunge).setVisible(viewType == AdapterMessage.ViewType.FOLDER &&
|
||||
|
|
|
@ -793,6 +793,8 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
|
|||
} else {
|
||||
EmailService iservice = new EmailService(this, ident, EmailService.PURPOSE_USE, debug);
|
||||
try {
|
||||
if (ident.envelopeFrom != null)
|
||||
iservice.setMailFrom(ident.envelopeFrom);
|
||||
if (send_partial)
|
||||
iservice.setSendPartial(true);
|
||||
iservice.setUseIp(ident.use_ip, ident.ehlo);
|
||||
|
|
Loading…
Reference in New Issue