Revert "Experiment: swipe left/right to reply"

This reverts commit 9df54b0659.
This commit is contained in:
M66B 2021-11-21 18:27:04 +01:00
parent dfa030af02
commit a0d4d0d729
3 changed files with 3 additions and 28 deletions

View File

@ -1990,7 +1990,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
boolean button_headers = prefs.getBoolean("button_headers", false);
boolean button_unsubscribe = prefs.getBoolean("button_unsubscribe", true);
boolean button_rule = prefs.getBoolean("button_rule", false);
boolean experiments = prefs.getBoolean("experiments", false);
ibHide.setImageResource(message.ui_snoozed == null ? R.drawable.twotone_visibility_off_24 : R.drawable.twotone_visibility_24);
ibSeen.setImageResource(message.ui_seen ? R.drawable.twotone_mail_24 : R.drawable.twotone_drafts_24);
@ -2014,7 +2013,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibForceLight.setImageLevel(force_light ? 1 : 0);
ibHide.setVisibility(tools && button_hide && !outbox ? View.VISIBLE : View.GONE);
ibSeen.setVisibility(tools && button_seen && !outbox && seen ? View.VISIBLE : View.GONE);
ibAnswer.setVisibility(!tools || outbox || (!expand_all && expand_one) || !threading || experiments ? View.GONE : View.VISIBLE);
ibAnswer.setVisibility(!tools || outbox || (!expand_all && expand_one) || !threading ? View.GONE : View.VISIBLE);
ibNotes.setVisibility(tools && button_notes && !outbox ? View.VISIBLE : View.GONE);
ibLabels.setVisibility(tools && labels_header && labels ? View.VISIBLE : View.GONE);
ibKeywords.setVisibility(tools && button_keywords && keywords ? View.VISIBLE : View.GONE);

View File

@ -113,7 +113,6 @@ public class EntityMessage implements Serializable {
static final Long SWIPE_ACTION_FLAG = -6L;
static final Long SWIPE_ACTION_DELETE = -7L;
static final Long SWIPE_ACTION_JUNK = -8L;
static final Long SWIPE_ACTION_REPLY = -9L;
@PrimaryKey(autoGenerate = true)
public Long id;

View File

@ -317,7 +317,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
private String onclose;
private boolean quick_scroll;
private boolean addresses;
private boolean experiments;
private int colorPrimary;
private int colorAccent;
@ -445,7 +444,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
onclose = (autoclose ? null : prefs.getString("onclose", null));
quick_scroll = prefs.getBoolean("quick_scroll", true);
addresses = prefs.getBoolean("addresses", false);
experiments = prefs.getBoolean("experiments", false);
colorPrimary = Helper.resolveColor(getContext(), R.attr.colorPrimary);
colorAccent = Helper.resolveColor(getContext(), R.attr.colorAccent);
@ -2123,10 +2121,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (message == null)
return 0;
if (experiments &&
iProperties.getValue("expanded", message.id))
return makeMovementFlags(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT);
if (EntityFolder.OUTBOX.equals(message.folderType))
return makeMovementFlags(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT);
@ -2200,14 +2194,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
return;
TupleAccountSwipes swipes;
if (experiments &&
iProperties.getValue("expanded", message.id)) {
swipes = new TupleAccountSwipes();
swipes.swipe_right = EntityMessage.SWIPE_ACTION_REPLY;
swipes.right_type = null;
swipes.swipe_left = EntityMessage.SWIPE_ACTION_REPLY;
swipes.left_type = null;
} else if (EntityFolder.OUTBOX.equals(message.folderType)) {
if (EntityFolder.OUTBOX.equals(message.folderType)) {
swipes = new TupleAccountSwipes();
swipes.swipe_right = 0L;
swipes.right_type = EntityFolder.DRAFTS;
@ -2269,8 +2256,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
(action.equals(message.folder) && EntityFolder.TRASH.equals(message.folderType)) ||
(EntityFolder.TRASH.equals(actionType) && EntityFolder.JUNK.equals(message.folderType)))
icon = R.drawable.twotone_delete_forever_24;
else if (EntityMessage.SWIPE_ACTION_REPLY.equals(action))
icon = R.drawable.twotone_reply_24;
else
icon = EntityFolder.getIcon(dX > 0 ? swipes.right_type : swipes.left_type);
@ -2339,13 +2324,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
return;
}
if (experiments &&
iProperties.getValue("expanded", message.id)) {
adapter.notifyItemChanged(pos);
onMenuReply(message, "reply", null);
return;
}
if (EntityFolder.OUTBOX.equals(message.folderType)) {
ActivityCompose.undoSend(message.id, getContext(), getViewLifecycleOwner(), getParentFragmentManager());
return;
@ -2427,8 +2405,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (message == null)
return null;
if (!experiments &&
iProperties.getValue("expanded", message.id))
if (iProperties.getValue("expanded", message.id))
return null;
return message;