in chat-profile-contact-list, open contact-profile on tap (instead of asking to start a new chat directly)

This commit is contained in:
B. Petersen
2019-06-18 00:05:58 +02:00
parent 18e09b0225
commit 9699214781
2 changed files with 3 additions and 14 deletions
-1
View File
@@ -211,7 +211,6 @@
<activity android:name=".ProfileActivity"
android:theme="@style/TextSecure.LightNoActionBar"
android:windowSoftInputMode="stateHidden"
android:launchMode="singleTask"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".DummyActivity"
@@ -187,19 +187,9 @@ public class ProfileSettingsFragment extends Fragment
onQrInvite();
}
else if(contactId>DcContact.DC_CONTACT_ID_LAST_SPECIAL) {
new AlertDialog.Builder(getContext())
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
int chatId = dcContext.createChatByContactId(contactId);
if( chatId != 0 ) {
Intent intent = new Intent(getContext(), ConversationActivity.class);
intent.putExtra(ConversationActivity.CHAT_ID_EXTRA, chatId);
getContext().startActivity(intent);
getActivity().finish();
}
})
.setNegativeButton(android.R.string.cancel, null)
.setMessage(getString(R.string.ask_start_chat_with, dcContext.getContact(contactId).getDisplayName()))
.show();
Intent intent = new Intent(getContext(), ProfileActivity.class);
intent.putExtra(ProfileActivity.CONTACT_ID_EXTRA, contactId);
startActivity(intent);
}
}