mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Prepare 'connecting' dialog.
This commit is contained in:
@@ -156,7 +156,6 @@ public class MrAccountSettingsActivity extends BaseFragment {
|
||||
}
|
||||
} else if (id == done_button) {
|
||||
saveData();
|
||||
finishFragment();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -192,6 +191,11 @@ public class MrAccountSettingsActivity extends BaseFragment {
|
||||
// Warning: the widgets are created as needed and may not be present!
|
||||
String v;
|
||||
|
||||
if( !isModified() && MrMailbox.MrMailboxIsConfigured(MrMailbox.hMailbox)!=0 ) {
|
||||
finishFragment();
|
||||
return; // nothing to do
|
||||
}
|
||||
|
||||
if( addrCell!=null) {
|
||||
v = addrCell.getValue().trim();
|
||||
MrMailbox.MrMailboxSetConfig(MrMailbox.hMailbox, "addr", v.isEmpty() ? null : v);
|
||||
@@ -239,6 +243,18 @@ public class MrAccountSettingsActivity extends BaseFragment {
|
||||
|
||||
MrMailbox.MrMailboxConfigure(MrMailbox.hMailbox);
|
||||
|
||||
// show dialog
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
||||
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
||||
builder.setMessage("Testing the server connection, this may take a moment.");
|
||||
builder.setNeutralButton(LocaleController.getString("Cancel", R.string.Cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
finishFragment();
|
||||
}
|
||||
});
|
||||
showDialog(builder.create());
|
||||
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.mainUserInfoChanged);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user