mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-12-23 05:16:58 +00:00
fix notification navigation in pursuant to #850
This commit is contained in:
parent
4ab225cdaf
commit
d0e01b3b9b
@ -31,7 +31,6 @@ import awais.instagrabber.R;
|
||||
import awais.instagrabber.adapters.NotificationsAdapter;
|
||||
import awais.instagrabber.adapters.NotificationsAdapter.OnNotificationClickListener;
|
||||
import awais.instagrabber.databinding.FragmentNotificationsViewerBinding;
|
||||
import awais.instagrabber.fragments.settings.MorePreferencesFragmentDirections;
|
||||
import awais.instagrabber.models.enums.NotificationType;
|
||||
import awais.instagrabber.repositories.requests.StoryViewerOptions;
|
||||
import awais.instagrabber.repositories.responses.FriendshipChangeResponse;
|
||||
@ -278,7 +277,7 @@ public final class NotificationsViewerFragment extends Fragment implements Swipe
|
||||
}
|
||||
|
||||
private void openProfile(final String username) {
|
||||
final NavDirections action = MorePreferencesFragmentDirections
|
||||
final NavDirections action = NotificationsViewerFragmentDirections
|
||||
.actionGlobalProfileFragment("@" + username);
|
||||
NavHostFragment.findNavController(this).navigate(action);
|
||||
}
|
||||
|
@ -223,8 +223,6 @@ public class MorePreferencesFragment extends BasePreferencesFragment {
|
||||
-1,
|
||||
preference -> {
|
||||
if (BuildConfig.isPre) return true;
|
||||
final AppCompatActivity activity = (AppCompatActivity) getActivity();
|
||||
if (activity == null) return true;
|
||||
FlavorTown.updateCheck(activity, true);
|
||||
return true;
|
||||
}));
|
||||
|
@ -24,6 +24,17 @@
|
||||
app:destination="@id/storyViewerFragment" />
|
||||
</fragment>
|
||||
|
||||
<include app:graph="@navigation/profile_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_profileFragment"
|
||||
app:destination="@id/profile_nav_graph">
|
||||
<argument
|
||||
android:name="username"
|
||||
app:argType="string"
|
||||
app:nullable="true" />
|
||||
</action>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_notificationsViewerFragment"
|
||||
app:destination="@id/notificationsViewer">
|
||||
|
@ -71,11 +71,9 @@
|
||||
app:argType="long" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/notification_viewer_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_notificationsViewerFragment"
|
||||
app:destination="@id/notification_viewer_nav_graph">
|
||||
app:destination="@id/notificationsViewer">
|
||||
<argument
|
||||
android:name="type"
|
||||
app:argType="string"
|
||||
@ -86,6 +84,22 @@
|
||||
app:argType="long" />
|
||||
</action>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/notificationsViewer"
|
||||
android:name="awais.instagrabber.fragments.NotificationsViewerFragment"
|
||||
android:label="@string/title_notifications"
|
||||
tools:layout="@layout/fragment_notifications_viewer">
|
||||
<argument
|
||||
android:name="type"
|
||||
app:argType="string"
|
||||
app:nullable="false"
|
||||
android:defaultValue="notif"/>
|
||||
<argument
|
||||
android:name="targetId"
|
||||
android:defaultValue="0L"
|
||||
app:argType="long" />
|
||||
</fragment>
|
||||
|
||||
<include app:graph="@navigation/saved_nav_graph" />
|
||||
|
||||
<action
|
||||
|
Loading…
Reference in New Issue
Block a user