Browse Source
fix navigation actions for fdroid
renovate/org.robolectric-robolectric-4.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
4 changed files with
7 additions and
8 deletions
-
app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageSettingsFragment.java
-
app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java
-
app/src/main/res/navigation/notification_viewer_nav_graph.xml
-
app/src/main/res/navigation/profile_nav_graph.xml
|
|
@ -354,8 +354,7 @@ public class DirectMessageSettingsFragment extends Fragment implements ConfirmDi |
|
|
|
} |
|
|
|
if (TextUtils.isEmpty(user.getUsername())) return; |
|
|
|
final ProfileNavGraphDirections.ActionGlobalProfileFragment directions = ProfileNavGraphDirections |
|
|
|
.actionGlobalProfileFragment() |
|
|
|
.setUsername("@" + user.getUsername()); |
|
|
|
.actionGlobalProfileFragment("@" + user.getUsername()); |
|
|
|
NavHostFragment.findNavController(this).navigate(directions); |
|
|
|
}, |
|
|
|
(position, user) -> { |
|
|
@ -393,8 +392,7 @@ public class DirectMessageSettingsFragment extends Fragment implements ConfirmDi |
|
|
|
@Override |
|
|
|
public void onClick(final int position, final PendingUser pendingUser) { |
|
|
|
final ProfileNavGraphDirections.ActionGlobalProfileFragment directions = ProfileNavGraphDirections |
|
|
|
.actionGlobalProfileFragment() |
|
|
|
.setUsername("@" + pendingUser.getUser().getUsername()); |
|
|
|
.actionGlobalProfileFragment("@" + pendingUser.getUser().getUsername()); |
|
|
|
NavHostFragment.findNavController(DirectMessageSettingsFragment.this).navigate(directions); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1447,8 +1447,7 @@ public class DirectMessageThreadFragment extends Fragment implements DirectReact |
|
|
|
|
|
|
|
private void navigateToUser(@NonNull final String username) { |
|
|
|
final ProfileNavGraphDirections.ActionGlobalProfileFragment direction = ProfileNavGraphDirections |
|
|
|
.actionGlobalProfileFragment() |
|
|
|
.setUsername("@" + username); |
|
|
|
.actionGlobalProfileFragment("@" + username); |
|
|
|
NavHostFragment.findNavController(DirectMessageThreadFragment.this).navigate(direction); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -13,7 +13,7 @@ |
|
|
|
<argument |
|
|
|
android:name="username" |
|
|
|
app:argType="string" |
|
|
|
app:nullable="true" /> |
|
|
|
app:nullable="false" /> |
|
|
|
</action> |
|
|
|
|
|
|
|
<action |
|
|
|
|
|
@ -56,7 +56,6 @@ |
|
|
|
app:destination="@id/profile_nav_graph"> |
|
|
|
<argument |
|
|
|
android:name="username" |
|
|
|
android:defaultValue="" |
|
|
|
app:argType="string" |
|
|
|
app:nullable="false" /> |
|
|
|
</action> |
|
|
@ -82,6 +81,9 @@ |
|
|
|
android:name="targetId" |
|
|
|
android:defaultValue="0L" |
|
|
|
app:argType="long" /> |
|
|
|
<action |
|
|
|
android:id="@+id/action_notifications_to_story" |
|
|
|
app:destination="@id/storyViewerFragment" /> |
|
|
|
</action> |
|
|
|
|
|
|
|
<fragment |
|
|
|