mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +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 ();
|
||||
|
|
|
@ -752,6 +752,13 @@ public class ConversationFragment extends MessageSelectorFragment
|
|||
WebxdcActivity.openWebxdcActivity(getContext(), messageRecord.getParent(), messageRecord.getWebxdcHref());
|
||||
}
|
||||
}
|
||||
else {
|
||||
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()
|
||||
|
@ -762,6 +769,7 @@ public class ConversationFragment extends MessageSelectorFragment
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(DcMsg messageRecord, View view) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue