mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-23 17:22:17 -05:00
show snackbar in conversations with stranger to block. fixes #2358
This commit is contained in:
parent
7306e0286f
commit
5fae9465d1
@ -954,6 +954,13 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||
}
|
||||
};
|
||||
|
||||
private OnClickListener mBlockClickListener = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
BlockContactDialog.show(activity, conversation);
|
||||
}
|
||||
};
|
||||
|
||||
private OnClickListener mAddBackClickListener = new OnClickListener() {
|
||||
|
||||
@Override
|
||||
@ -1047,6 +1054,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||
&& (conversation.getOtrSession().getSessionStatus() == SessionStatus.ENCRYPTED)
|
||||
&& (!conversation.isOtrFingerprintVerified())) {
|
||||
showSnackbar(R.string.unknown_otr_fingerprint, R.string.verify, clickToVerify);
|
||||
} else if (conversation.isWithStranger() && !conversation.isBlocked()) {
|
||||
showSnackbar(R.string.received_message_from_stranger,R.string.block, mBlockClickListener);
|
||||
} else {
|
||||
hideSnackbar();
|
||||
}
|
||||
|
@ -738,4 +738,5 @@
|
||||
<string name="contact_blocked_past_tense">Contact blocked.</string>
|
||||
<string name="pref_notifications_from_strangers">Notifications from strangers</string>
|
||||
<string name="pref_notifications_from_strangers_summary">Notify for messages received from strangers.</string>
|
||||
<string name="received_message_from_stranger">Received message from stranger</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user