remove 'indicate received' setting and default to true

This commit is contained in:
Daniel Gultsch 2019-11-08 12:06:38 +01:00
parent 333f629b32
commit abc1cb5a89
6 changed files with 3 additions and 21 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -89,7 +89,6 @@ public class MessageAdapter extends ArrayAdapter<Message> 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<Message> messages) {
@ -208,9 +207,7 @@ public class MessageAdapter extends ArrayAdapter<Message> 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<Message> 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));
}

View File

@ -32,7 +32,6 @@
<bool name="manually_change_presence">false</bool>
<bool name="away_when_screen_off">false</bool>
<bool name="autojoin">true</bool>
<bool name="indicate_received">false</bool>
<bool name="enable_foreground_service">false</bool>
<bool name="never_send">false</bool>
<bool name="validate_hostname">false</bool>

View File

@ -282,8 +282,6 @@
<string name="title_pref_enable_quiet_hours">Enable quiet hours</string>
<string name="pref_quiet_hours_summary">Notifications will be silenced during quiet hours</string>
<string name="pref_use_send_button_to_indicate_status">Send button indicates status</string>
<string name="pref_use_indicate_received">Request message receipts</string>
<string name="pref_use_indicate_received_summary">Received messages will be marked with a green tick if supported</string>
<string name="pref_use_send_button_to_indicate_status_summary">Colorize send button to indicate contact status</string>
<string name="pref_expert_options_other">Other</string>
<string name="pref_autojoin">Synchronize with bookmarks</string>

View File

@ -328,11 +328,6 @@
<PreferenceCategory
android:key="other_expert_category"
android:title="@string/pref_expert_options_other">
<CheckBoxPreference
android:defaultValue="@bool/indicate_received"
android:key="indicate_received"
android:summary="@string/pref_use_indicate_received_summary"
android:title="@string/pref_use_indicate_received" />
<CheckBoxPreference
android:defaultValue="@bool/enable_foreground_service"
android:key="enable_foreground_service"