Search in sources :

Example 1 with ParcelableGroupId

use of org.thoughtcrime.securesms.groups.ParcelableGroupId in project Signal-Android by WhisperSystems.

the class EditProfileFragment method startAvatarSelection.

private void startAvatarSelection() {
    if (viewModel.isGroup()) {
        Parcelable groupId = ParcelableGroupId.from(viewModel.getGroupId());
        SafeNavigation.safeNavigate(Navigation.findNavController(requireView()), EditProfileFragmentDirections.actionCreateProfileFragmentToAvatarPicker((ParcelableGroupId) groupId, viewModel.getAvatarMedia()));
    } else {
        SafeNavigation.safeNavigate(Navigation.findNavController(requireView()), EditProfileFragmentDirections.actionCreateProfileFragmentToAvatarPicker(null, null));
    }
}
Also used : Parcelable(android.os.Parcelable) ParcelableGroupId(org.thoughtcrime.securesms.groups.ParcelableGroupId)

Example 2 with ParcelableGroupId

use of org.thoughtcrime.securesms.groups.ParcelableGroupId in project Signal-Android by signalapp.

the class EditProfileFragment method startAvatarSelection.

private void startAvatarSelection() {
    if (viewModel.isGroup()) {
        Parcelable groupId = ParcelableGroupId.from(viewModel.getGroupId());
        SafeNavigation.safeNavigate(Navigation.findNavController(requireView()), EditProfileFragmentDirections.actionCreateProfileFragmentToAvatarPicker((ParcelableGroupId) groupId, viewModel.getAvatarMedia()));
    } else {
        SafeNavigation.safeNavigate(Navigation.findNavController(requireView()), EditProfileFragmentDirections.actionCreateProfileFragmentToAvatarPicker(null, null));
    }
}
Also used : Parcelable(android.os.Parcelable) ParcelableGroupId(org.thoughtcrime.securesms.groups.ParcelableGroupId)

Aggregations

Parcelable (android.os.Parcelable)2 ParcelableGroupId (org.thoughtcrime.securesms.groups.ParcelableGroupId)2