mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 06:37:30 +00:00
Check for username first, then fb id
This commit is contained in:
parent
6f67dadb31
commit
ee36ba8c35
@ -347,14 +347,15 @@ public class DirectMessageSettingsFragment extends Fragment implements ConfirmDi
|
||||
usersAdapter = new DirectUsersAdapter(
|
||||
inviter != null ? inviter.getPk() : -1,
|
||||
(position, user, selected) -> {
|
||||
if (!TextUtils.isEmpty(user.getFbId())) {
|
||||
if (TextUtils.isEmpty(user.getUsername()) && !TextUtils.isEmpty(user.getFbId())) {
|
||||
Utils.openURL(context, "https://facebook.com/" + user.getFbId());
|
||||
} else {
|
||||
final ProfileNavGraphDirections.ActionGlobalProfileFragment directions = ProfileNavGraphDirections
|
||||
.actionGlobalProfileFragment()
|
||||
.setUsername("@" + user.getUsername());
|
||||
NavHostFragment.findNavController(this).navigate(directions);
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(user.getUsername())) return;
|
||||
final ProfileNavGraphDirections.ActionGlobalProfileFragment directions = ProfileNavGraphDirections
|
||||
.actionGlobalProfileFragment()
|
||||
.setUsername("@" + user.getUsername());
|
||||
NavHostFragment.findNavController(this).navigate(directions);
|
||||
},
|
||||
(position, user) -> {
|
||||
final ArrayList<Option<String>> options = viewModel.createUserOptions(user);
|
||||
|
Loading…
Reference in New Issue
Block a user