mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Add megaphone for new avatar picker.
This commit is contained in:
committed by
Greyson Parrelli
parent
963c018e0c
commit
a75f634c0a
@@ -25,6 +25,7 @@ public class ManageProfileActivity extends PassphraseRequiredActivity implements
|
||||
private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme();
|
||||
|
||||
public static final String START_AT_USERNAME = "start_at_username";
|
||||
public static final String START_AT_AVATAR = "start_at_avatar";
|
||||
|
||||
public static @NonNull Intent getIntent(@NonNull Context context) {
|
||||
return new Intent(context, ManageProfileActivity.class);
|
||||
@@ -36,6 +37,12 @@ public class ManageProfileActivity extends PassphraseRequiredActivity implements
|
||||
return intent;
|
||||
}
|
||||
|
||||
public static @NonNull Intent getIntentForAvatarEdit(@NonNull Context context) {
|
||||
Intent intent = new Intent(context, ManageProfileActivity.class);
|
||||
intent.putExtra(START_AT_AVATAR, true);
|
||||
return intent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle bundle, boolean ready) {
|
||||
dynamicTheme.onCreate(this);
|
||||
@@ -52,6 +59,11 @@ public class ManageProfileActivity extends PassphraseRequiredActivity implements
|
||||
NavDirections action = ManageProfileFragmentDirections.actionManageUsername();
|
||||
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(action);
|
||||
}
|
||||
|
||||
if (extras != null && extras.getBoolean(START_AT_AVATAR, false)) {
|
||||
NavDirections action = ManageProfileFragmentDirections.actionManageProfileFragmentToAvatarPicker(null, null);
|
||||
Navigation.findNavController(this, R.id.nav_host_fragment).navigate(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user