remove 'indicate received' setting and default to true
This commit is contained in:
parent
333f629b32
commit
abc1cb5a89
|
@ -37,16 +37,14 @@ public class MessageGenerator extends AbstractGenerator {
|
||||||
if (conversation.getMode() == Conversation.MODE_SINGLE) {
|
if (conversation.getMode() == Conversation.MODE_SINGLE) {
|
||||||
packet.setTo(message.getCounterpart());
|
packet.setTo(message.getCounterpart());
|
||||||
packet.setType(MessagePacket.TYPE_CHAT);
|
packet.setType(MessagePacket.TYPE_CHAT);
|
||||||
if (this.mXmppConnectionService.indicateReceived() && !isWithSelf) {
|
if (!isWithSelf) {
|
||||||
packet.addChild("request", "urn:xmpp:receipts");
|
packet.addChild("request", "urn:xmpp:receipts");
|
||||||
}
|
}
|
||||||
} else if (message.isPrivateMessage()) {
|
} else if (message.isPrivateMessage()) {
|
||||||
packet.setTo(message.getCounterpart());
|
packet.setTo(message.getCounterpart());
|
||||||
packet.setType(MessagePacket.TYPE_CHAT);
|
packet.setType(MessagePacket.TYPE_CHAT);
|
||||||
packet.addChild("x", "http://jabber.org/protocol/muc#user");
|
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 {
|
} else {
|
||||||
packet.setTo(message.getCounterpart().asBareJid());
|
packet.setTo(message.getCounterpart().asBareJid());
|
||||||
packet.setType(MessagePacket.TYPE_GROUPCHAT);
|
packet.setType(MessagePacket.TYPE_GROUPCHAT);
|
||||||
|
|
|
@ -3906,10 +3906,6 @@ public class XmppConnectionService extends Service {
|
||||||
return getBooleanPreference("autojoin", R.bool.autojoin);
|
return getBooleanPreference("autojoin", R.bool.autojoin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean indicateReceived() {
|
|
||||||
return getBooleanPreference("indicate_received", R.bool.indicate_received);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean useTorToConnect() {
|
public boolean useTorToConnect() {
|
||||||
return QuickConversationsService.isConversations() && getBooleanPreference("use_tor", R.bool.use_tor);
|
return QuickConversationsService.isConversations() && getBooleanPreference("use_tor", R.bool.use_tor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
|
||||||
private DisplayMetrics metrics;
|
private DisplayMetrics metrics;
|
||||||
private OnContactPictureClicked mOnContactPictureClickedListener;
|
private OnContactPictureClicked mOnContactPictureClickedListener;
|
||||||
private OnContactPictureLongClicked mOnContactPictureLongClickedListener;
|
private OnContactPictureLongClicked mOnContactPictureLongClickedListener;
|
||||||
private boolean mIndicateReceived = false;
|
|
||||||
private boolean mUseGreenBackground = false;
|
private boolean mUseGreenBackground = false;
|
||||||
private OnQuoteListener onQuoteListener;
|
private OnQuoteListener onQuoteListener;
|
||||||
public MessageAdapter(XmppActivity activity, List<Message> messages) {
|
public MessageAdapter(XmppActivity activity, List<Message> messages) {
|
||||||
|
@ -208,9 +207,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
|
||||||
break;
|
break;
|
||||||
case Message.STATUS_SEND_RECEIVED:
|
case Message.STATUS_SEND_RECEIVED:
|
||||||
case Message.STATUS_SEND_DISPLAYED:
|
case Message.STATUS_SEND_DISPLAYED:
|
||||||
if (mIndicateReceived) {
|
|
||||||
viewHolder.indicatorReceived.setVisibility(View.VISIBLE);
|
viewHolder.indicatorReceived.setVisibility(View.VISIBLE);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case Message.STATUS_SEND_FAILED:
|
case Message.STATUS_SEND_FAILED:
|
||||||
final String errorMessage = message.getErrorMessage();
|
final String errorMessage = message.getErrorMessage();
|
||||||
|
@ -910,7 +907,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
|
||||||
|
|
||||||
public void updatePreferences() {
|
public void updatePreferences() {
|
||||||
SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(activity);
|
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));
|
this.mUseGreenBackground = p.getBoolean("use_green_background", activity.getResources().getBoolean(R.bool.use_green_background));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
<bool name="manually_change_presence">false</bool>
|
<bool name="manually_change_presence">false</bool>
|
||||||
<bool name="away_when_screen_off">false</bool>
|
<bool name="away_when_screen_off">false</bool>
|
||||||
<bool name="autojoin">true</bool>
|
<bool name="autojoin">true</bool>
|
||||||
<bool name="indicate_received">false</bool>
|
|
||||||
<bool name="enable_foreground_service">false</bool>
|
<bool name="enable_foreground_service">false</bool>
|
||||||
<bool name="never_send">false</bool>
|
<bool name="never_send">false</bool>
|
||||||
<bool name="validate_hostname">false</bool>
|
<bool name="validate_hostname">false</bool>
|
||||||
|
|
|
@ -282,8 +282,6 @@
|
||||||
<string name="title_pref_enable_quiet_hours">Enable quiet hours</string>
|
<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_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_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_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_expert_options_other">Other</string>
|
||||||
<string name="pref_autojoin">Synchronize with bookmarks</string>
|
<string name="pref_autojoin">Synchronize with bookmarks</string>
|
||||||
|
|
|
@ -328,11 +328,6 @@
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="other_expert_category"
|
android:key="other_expert_category"
|
||||||
android:title="@string/pref_expert_options_other">
|
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
|
<CheckBoxPreference
|
||||||
android:defaultValue="@bool/enable_foreground_service"
|
android:defaultValue="@bool/enable_foreground_service"
|
||||||
android:key="enable_foreground_service"
|
android:key="enable_foreground_service"
|
||||||
|
|
Loading…
Reference in New Issue