From abc1cb5a89d07ebd4b14cbb478f467cd5c57768f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 8 Nov 2019 12:06:38 +0100 Subject: [PATCH] remove 'indicate received' setting and default to true --- .../eu/siacs/conversations/generator/MessageGenerator.java | 6 ++---- .../siacs/conversations/services/XmppConnectionService.java | 4 ---- .../eu/siacs/conversations/ui/adapter/MessageAdapter.java | 6 +----- src/main/res/values/defaults.xml | 1 - src/main/res/values/strings.xml | 2 -- src/main/res/xml/preferences.xml | 5 ----- 6 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java index dbf8e7cb2..56445e0d6 100644 --- a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java @@ -37,16 +37,14 @@ public class MessageGenerator extends AbstractGenerator { if (conversation.getMode() == Conversation.MODE_SINGLE) { packet.setTo(message.getCounterpart()); packet.setType(MessagePacket.TYPE_CHAT); - if (this.mXmppConnectionService.indicateReceived() && !isWithSelf) { + if (!isWithSelf) { packet.addChild("request", "urn:xmpp:receipts"); } } else if (message.isPrivateMessage()) { packet.setTo(message.getCounterpart()); packet.setType(MessagePacket.TYPE_CHAT); packet.addChild("x", "http://jabber.org/protocol/muc#user"); - if (this.mXmppConnectionService.indicateReceived()) { - packet.addChild("request", "urn:xmpp:receipts"); - } + packet.addChild("request", "urn:xmpp:receipts"); } else { packet.setTo(message.getCounterpart().asBareJid()); packet.setType(MessagePacket.TYPE_GROUPCHAT); diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index e79a0bfaa..df2aaec19 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -3906,10 +3906,6 @@ public class XmppConnectionService extends Service { return getBooleanPreference("autojoin", R.bool.autojoin); } - public boolean indicateReceived() { - return getBooleanPreference("indicate_received", R.bool.indicate_received); - } - public boolean useTorToConnect() { return QuickConversationsService.isConversations() && getBooleanPreference("use_tor", R.bool.use_tor); } diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 40cc740c0..a8a93d4e8 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -89,7 +89,6 @@ public class MessageAdapter extends ArrayAdapter implements CopyTextVie private DisplayMetrics metrics; private OnContactPictureClicked mOnContactPictureClickedListener; private OnContactPictureLongClicked mOnContactPictureLongClickedListener; - private boolean mIndicateReceived = false; private boolean mUseGreenBackground = false; private OnQuoteListener onQuoteListener; public MessageAdapter(XmppActivity activity, List messages) { @@ -208,9 +207,7 @@ public class MessageAdapter extends ArrayAdapter implements CopyTextVie break; case Message.STATUS_SEND_RECEIVED: case Message.STATUS_SEND_DISPLAYED: - if (mIndicateReceived) { - viewHolder.indicatorReceived.setVisibility(View.VISIBLE); - } + viewHolder.indicatorReceived.setVisibility(View.VISIBLE); break; case Message.STATUS_SEND_FAILED: final String errorMessage = message.getErrorMessage(); @@ -910,7 +907,6 @@ public class MessageAdapter extends ArrayAdapter implements CopyTextVie public void updatePreferences() { SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(activity); - this.mIndicateReceived = p.getBoolean("indicate_received", activity.getResources().getBoolean(R.bool.indicate_received)); this.mUseGreenBackground = p.getBoolean("use_green_background", activity.getResources().getBoolean(R.bool.use_green_background)); } diff --git a/src/main/res/values/defaults.xml b/src/main/res/values/defaults.xml index d17c8c277..a41fcbae2 100644 --- a/src/main/res/values/defaults.xml +++ b/src/main/res/values/defaults.xml @@ -32,7 +32,6 @@ false false true - false false false false diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 47bd247ab..46a6f0311 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -282,8 +282,6 @@ Enable quiet hours Notifications will be silenced during quiet hours Send button indicates status - Request message receipts - Received messages will be marked with a green tick if supported Colorize send button to indicate contact status Other Synchronize with bookmarks diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml index efea33a2c..ed67e1be8 100644 --- a/src/main/res/xml/preferences.xml +++ b/src/main/res/xml/preferences.xml @@ -328,11 +328,6 @@ -