mirror of
https://github.com/DrKLO/Telegram.git
synced 2025-03-15 20:08:00 +01:00
Added confirmation when sending contact info
This commit is contained in:
parent
4471dac0de
commit
f9d23e3137
3 changed files with 19 additions and 6 deletions
|
@ -2496,15 +2496,26 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
|
|||
topPanel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MessagesController.getInstance().hidenAddToContacts.put(currentUser.id, currentUser);
|
||||
topPanel.setVisibility(View.GONE);
|
||||
MessagesController.getInstance().sendMessage(UserConfig.currentUser, dialog_id);
|
||||
chatListView.post(new Runnable() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity);
|
||||
builder.setMessage(LocaleController.getString("ShareMyContactInfoConfirmation", R.string.ShareMyContactInfoConfirmation));
|
||||
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
||||
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void run() {
|
||||
chatListView.setSelectionFromTop(messages.size() - 1, -100000 - chatListView.getPaddingTop());
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
MessagesController.getInstance().hidenAddToContacts.put(currentUser.id, currentUser);
|
||||
topPanel.setVisibility(View.GONE);
|
||||
MessagesController.getInstance().sendMessage(UserConfig.currentUser, dialog_id);
|
||||
chatListView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
chatListView.setSelectionFromTop(messages.size() - 1, -100000 - chatListView.getPaddingTop());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
|
||||
builder.show().setCanceledOnTouchOutside(true);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ public class UserProfileActivity extends BaseFragment implements NotificationCen
|
|||
public void onClick(View view) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity);
|
||||
builder.setMessage(LocaleController.getString("SecretChatConfirmation", R.string.SecretChatConfirmation));
|
||||
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
||||
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
<string name="DOWNLOAD">Download</string>
|
||||
<string name="Selected">Selected:</string>
|
||||
<string name="ShareMyContactInfo">SHARE MY CONTACT INFO</string>
|
||||
<string name="ShareMyContactInfoConfirmation">Do you want to share your contact info?</string>
|
||||
<string name="AddToContacts">ADD TO CONTACTS</string>
|
||||
<string name="EncryptedPlaceholderTitleIncoming">%s invited you to join a secret chat.</string>
|
||||
<string name="EncryptedPlaceholderTitleOutgoing">You have invited %s to join a secret chat.</string>
|
||||
|
|
Loading…
Add table
Reference in a new issue