aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ActionBarActivity.java8
-rw-r--r--src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java8
2 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java b/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java
index 997edaac3..06dad3d13 100644
--- a/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java
@@ -5,9 +5,13 @@ import android.support.v7.app.AppCompatActivity;
public abstract class ActionBarActivity extends AppCompatActivity {
public static void configureActionBar(ActionBar actionBar) {
+ configureActionBar(actionBar, true);
+ }
+
+ public static void configureActionBar(ActionBar actionBar, boolean upNavigation) {
if (actionBar != null) {
- actionBar.setHomeButtonEnabled(true);
- actionBar.setDisplayHomeAsUpEnabled(true);
+ actionBar.setHomeButtonEnabled(upNavigation);
+ actionBar.setDisplayHomeAsUpEnabled(upNavigation);
}
}
}
diff --git a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
index a6f158646..9d6df3980 100644
--- a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
@@ -77,7 +77,6 @@ public class PublishProfilePictureActivity extends XmppActivity implements XmppC
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_publish_profile_picture);
setSupportActionBar(findViewById(R.id.toolbar));
- configureActionBar(getSupportActionBar());
this.avatar = findViewById(R.id.account_image);
this.cancelButton = findViewById(R.id.cancel_button);
@@ -158,12 +157,13 @@ public class PublishProfilePictureActivity extends XmppActivity implements XmppC
@Override
protected void onStart() {
super.onStart();
- if (getIntent() != null) {
- this.mInitialAccountSetup = getIntent().getBooleanExtra("setup", false);
- }
+ final Intent intent = getIntent();
+ this.mInitialAccountSetup = intent != null && intent.getBooleanExtra("setup", false);
+
if (this.mInitialAccountSetup) {
this.cancelButton.setText(R.string.skip);
}
+ configureActionBar(getSupportActionBar(), !this.mInitialAccountSetup);
}
protected void loadImageIntoPreview(Uri uri) {