mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +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;
|
||||||
import awais.instagrabber.adapters.NotificationsAdapter.OnNotificationClickListener;
|
import awais.instagrabber.adapters.NotificationsAdapter.OnNotificationClickListener;
|
||||||
import awais.instagrabber.databinding.FragmentNotificationsViewerBinding;
|
import awais.instagrabber.databinding.FragmentNotificationsViewerBinding;
|
||||||
import awais.instagrabber.fragments.settings.MorePreferencesFragmentDirections;
|
|
||||||
import awais.instagrabber.models.enums.NotificationType;
|
import awais.instagrabber.models.enums.NotificationType;
|
||||||
import awais.instagrabber.repositories.requests.StoryViewerOptions;
|
import awais.instagrabber.repositories.requests.StoryViewerOptions;
|
||||||
import awais.instagrabber.repositories.responses.FriendshipChangeResponse;
|
import awais.instagrabber.repositories.responses.FriendshipChangeResponse;
|
||||||
@ -278,7 +277,7 @@ public final class NotificationsViewerFragment extends Fragment implements Swipe
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void openProfile(final String username) {
|
private void openProfile(final String username) {
|
||||||
final NavDirections action = MorePreferencesFragmentDirections
|
final NavDirections action = NotificationsViewerFragmentDirections
|
||||||
.actionGlobalProfileFragment("@" + username);
|
.actionGlobalProfileFragment("@" + username);
|
||||||
NavHostFragment.findNavController(this).navigate(action);
|
NavHostFragment.findNavController(this).navigate(action);
|
||||||
}
|
}
|
||||||
|
@ -223,8 +223,6 @@ public class MorePreferencesFragment extends BasePreferencesFragment {
|
|||||||
-1,
|
-1,
|
||||||
preference -> {
|
preference -> {
|
||||||
if (BuildConfig.isPre) return true;
|
if (BuildConfig.isPre) return true;
|
||||||
final AppCompatActivity activity = (AppCompatActivity) getActivity();
|
|
||||||
if (activity == null) return true;
|
|
||||||
FlavorTown.updateCheck(activity, true);
|
FlavorTown.updateCheck(activity, true);
|
||||||
return true;
|
return true;
|
||||||
}));
|
}));
|
||||||
|
@ -24,6 +24,17 @@
|
|||||||
app:destination="@id/storyViewerFragment" />
|
app:destination="@id/storyViewerFragment" />
|
||||||
</fragment>
|
</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
|
<action
|
||||||
android:id="@+id/action_global_notificationsViewerFragment"
|
android:id="@+id/action_global_notificationsViewerFragment"
|
||||||
app:destination="@id/notificationsViewer">
|
app:destination="@id/notificationsViewer">
|
||||||
|
@ -71,11 +71,9 @@
|
|||||||
app:argType="long" />
|
app:argType="long" />
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<include app:graph="@navigation/notification_viewer_nav_graph" />
|
|
||||||
|
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_global_notificationsViewerFragment"
|
android:id="@+id/action_global_notificationsViewerFragment"
|
||||||
app:destination="@id/notification_viewer_nav_graph">
|
app:destination="@id/notificationsViewer">
|
||||||
<argument
|
<argument
|
||||||
android:name="type"
|
android:name="type"
|
||||||
app:argType="string"
|
app:argType="string"
|
||||||
@ -86,6 +84,22 @@
|
|||||||
app:argType="long" />
|
app:argType="long" />
|
||||||
</action>
|
</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" />
|
<include app:graph="@navigation/saved_nav_graph" />
|
||||||
|
|
||||||
<action
|
<action
|
||||||
|
Loading…
Reference in New Issue
Block a user