mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 17:59:39 +02:00
open contact in scope when tapping info messages (#3710)
* open contact in scope when tapping info messages * update CHANGELOG --------- Co-authored-by: adb <adb@merlinux.eu>
This commit is contained in:
parent
d66acbb71e
commit
bc73e1a2ba
4 changed files with 22 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
* tapping info messages with contacts open the contact's profile
|
||||
* hide superfluous "Show Classic E-mails" advanced setting for chatmail
|
||||
* show profile bio/status under name in main settings screen
|
||||
* remove mostly non-telling transport addresses when referring to a contact;
|
||||
|
|
|
@ -1428,6 +1428,12 @@ JNIEXPORT jint Java_com_b44t_messenger_DcMsg_getInfoType(JNIEnv *env, jobject ob
|
|||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_DcMsg_getInfoContactId(JNIEnv *env, jobject obj)
|
||||
{
|
||||
return dc_msg_get_info_contact_id(get_dc_msg(env, obj));
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_DcMsg_getState(JNIEnv *env, jobject obj)
|
||||
{
|
||||
return dc_msg_get_state(get_dc_msg(env, obj));
|
||||
|
|
|
@ -122,6 +122,7 @@ public class DcMsg {
|
|||
public native boolean hasLocation ();
|
||||
public native int getType ();
|
||||
public native int getInfoType ();
|
||||
public native int getInfoContactId ();
|
||||
public native int getState ();
|
||||
public native int getDownloadState ();
|
||||
public native int getChatId ();
|
||||
|
|
|
@ -753,12 +753,20 @@ public class ConversationFragment extends MessageSelectorFragment
|
|||
}
|
||||
}
|
||||
else {
|
||||
String self_mail = dcContext.getConfig("configured_mail_user");
|
||||
if (self_mail != null && !self_mail.isEmpty()
|
||||
&& messageRecord.getText().contains(self_mail)
|
||||
&& getListAdapter().getChat().isDeviceTalk()) {
|
||||
// This is a device message informing the user that the password is wrong
|
||||
startActivity(new Intent(getActivity(), RegistrationActivity.class));
|
||||
int infoContactId = messageRecord.getInfoContactId();
|
||||
if (infoContactId != 0 && infoContactId != DC_CONTACT_ID_SELF) {
|
||||
Intent intent = new Intent(getContext(), ProfileActivity.class);
|
||||
intent.putExtra(ProfileActivity.CONTACT_ID_EXTRA, infoContactId);
|
||||
startActivity(intent);
|
||||
}
|
||||
else {
|
||||
String self_mail = dcContext.getConfig("configured_mail_user");
|
||||
if (self_mail != null && !self_mail.isEmpty()
|
||||
&& messageRecord.getText().contains(self_mail)
|
||||
&& getListAdapter().getChat().isDeviceTalk()) {
|
||||
// This is a device message informing the user that the password is wrong
|
||||
startActivity(new Intent(getActivity(), RegistrationActivity.class));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue