diff --git a/res/layout/profile_create_activity.xml b/res/layout/profile_create_activity.xml
index 66e09c4cb..a23f9793a 100644
--- a/res/layout/profile_create_activity.xml
+++ b/res/layout/profile_create_activity.xml
@@ -13,6 +13,18 @@
android:layout_marginTop="20dp"
android:orientation="vertical">
+
+
{
Intent intent = new Intent(this, RegistrationActivity.class);
startActivity(intent);
});
+
+ if (fromWelcome) {
+ String addr = DcHelper.get(this, "addr");
+ loginSuccessText.setText(String.format(
+ "Login successfull - your email address is %1$s\n\n" +
+ "If you like, you can now enter a name and an avatar image " +
+ "that will be displayed to people you write to.", addr));
+ ViewUtil.findById(this, R.id.status_text_layout).setVisibility(View.GONE);
+ ViewUtil.findById(this, R.id.information_label).setVisibility(View.GONE);
+ passwordAccountSettings.setVisibility(View.GONE);
+ } else {
+ loginSuccessText.setVisibility(View.GONE);
+ }
}
private void initializeProfileName() {
@@ -393,7 +393,10 @@ public class CreateProfileActivity extends BaseActionBarActivity {
if (result) {
if (captureFile != null) captureFile.delete();
- handleFinishedLegacy();
+ if (fromWelcome) {
+ startActivity(new Intent(getApplicationContext(), ConversationListActivity.class));
+ }
+ finish();
} else {
Toast.makeText(CreateProfileActivity.this, R.string.error, Toast.LENGTH_LONG).show();
}
@@ -405,9 +408,4 @@ public class CreateProfileActivity extends BaseActionBarActivity {
String newStatus = statusView.getText().toString().trim();
DcHelper.set(this, DcHelper.CONFIG_SELF_STATUS, newStatus);
}
-
- private void handleFinishedLegacy() {
- if (nextIntent != null) startActivity(nextIntent);
- finish();
- }
}
diff --git a/src/org/thoughtcrime/securesms/WelcomeActivity.java b/src/org/thoughtcrime/securesms/WelcomeActivity.java
index ff0d95d11..c0a3a7386 100644
--- a/src/org/thoughtcrime/securesms/WelcomeActivity.java
+++ b/src/org/thoughtcrime/securesms/WelcomeActivity.java
@@ -165,11 +165,18 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen
progressDialog.setMessage(getResources().getString(R.string.one_moment)+String.format(" %d%%", percent));
}
- private void progressSuccess() {
+ private void progressSuccess(boolean enterDisplayname) {
dcContext.endCaptureNextError();
progressDialog.dismiss();
- Intent conversationList = new Intent(getApplicationContext(), ConversationListActivity.class);
- startActivity(conversationList);
+
+ if (enterDisplayname) {
+ Intent intent = new Intent(getApplicationContext(), CreateProfileActivity.class);
+ intent.putExtra(CreateProfileActivity.FROM_WELCOME, true);
+ startActivity(intent);
+ } else {
+ startActivity(new Intent(getApplicationContext(), ConversationListActivity.class));
+ }
+
finish();
}
@@ -184,7 +191,7 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen
progressUpdate((int)progress);
}
else if (progress==1000/*done*/) {
- progressSuccess();
+ progressSuccess(false);
}
}
else if (manualConfigure && eventId==DcContext.DC_EVENT_CONFIGURE_PROGRESS) {
@@ -202,7 +209,7 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen
progressUpdate((int)progress);
}
else if (progress==1000/*done*/) {
- progressSuccess();
+ progressSuccess(true);
}
}
}