mirror of
https://github.com/KokaKiwi/BarInsta
synced 2026-03-05 12:01:35 +00:00
Allow opening PostViewV2Fragment from NotificationsViewerFragment, StoryViewerFragment and when opening from a Share dialog
This commit is contained in:
parent
a08167381f
commit
850e119236
14 changed files with 95 additions and 371 deletions
26
app/src/main/res/layout/dialog_opening_post.xml
Normal file
26
app/src/main/res/layout/dialog_opening_post.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/opening_post"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/progress_bar"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -38,22 +38,6 @@
|
|||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/post_view_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_postViewFragment"
|
||||
app:destination="@id/post_view_nav_graph">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</action>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/directMessagesInboxFragment"
|
||||
android:name="awais.instagrabber.fragments.directmessages.DirectMessageInboxFragment"
|
||||
|
|
|
|||
|
|
@ -38,22 +38,6 @@
|
|||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/post_view_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_postViewFragment"
|
||||
app:destination="@id/post_view_nav_graph">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/comments_nav_graph" />
|
||||
|
||||
<action
|
||||
|
|
|
|||
|
|
@ -38,22 +38,6 @@
|
|||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/post_view_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_postViewFragment"
|
||||
app:destination="@id/post_view_nav_graph">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/comments_nav_graph" />
|
||||
|
||||
<action
|
||||
|
|
|
|||
|
|
@ -5,20 +5,6 @@
|
|||
android:id="@+id/hashtag_nav_graph"
|
||||
app:startDestination="@id/hashTagFragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_postViewFragment"
|
||||
app:destination="@id/post_view_nav_graph">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/comments_nav_graph" />
|
||||
|
||||
<action
|
||||
|
|
|
|||
|
|
@ -5,20 +5,6 @@
|
|||
android:id="@+id/location_nav_graph"
|
||||
app:startDestination="@id/locationFragment">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_postViewFragment"
|
||||
app:destination="@id/post_view_nav_graph">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/comments_nav_graph" />
|
||||
|
||||
<action
|
||||
|
|
|
|||
|
|
@ -5,26 +5,11 @@
|
|||
android:id="@+id/more_nav_graph"
|
||||
app:startDestination="@id/morePreferencesFragment">
|
||||
|
||||
<include app:graph="@navigation/post_view_nav_graph" />
|
||||
<include app:graph="@navigation/profile_nav_graph" />
|
||||
<include app:graph="@navigation/hashtag_nav_graph" />
|
||||
<include app:graph="@navigation/location_nav_graph" />
|
||||
<include app:graph="@navigation/comments_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_postViewFragment"
|
||||
app:destination="@id/post_view_nav_graph">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</action>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_profileFragment"
|
||||
app:destination="@id/profile_nav_graph">
|
||||
|
|
|
|||
|
|
@ -1,85 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/post_view_nav_graph"
|
||||
app:startDestination="@id/postViewFragment">
|
||||
|
||||
<include app:graph="@navigation/hashtag_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_hashTagFragment"
|
||||
app:destination="@id/hashtag_nav_graph">
|
||||
<argument
|
||||
android:name="hashtag"
|
||||
app:argType="string"
|
||||
app:nullable="false" />
|
||||
</action>
|
||||
<!--<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>
|
||||
|
||||
<include app:graph="@navigation/location_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_locationFragment"
|
||||
app:destination="@id/location_nav_graph">
|
||||
<argument
|
||||
android:name="locationId"
|
||||
app:argType="string"
|
||||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_commentsViewerFragment"
|
||||
app:destination="@id/comments_nav_graph">
|
||||
<argument
|
||||
android:name="shortCode"
|
||||
app:argType="string"
|
||||
app:nullable="false" />
|
||||
<argument
|
||||
android:name="postId"
|
||||
app:argType="string"
|
||||
app:nullable="false" />
|
||||
<argument
|
||||
android:name="postUserId"
|
||||
app:argType="string"
|
||||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/postViewFragment"
|
||||
android:name="awais.instagrabber.fragments.PostViewFragment"
|
||||
tools:layout="@layout/item_full_post_view">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</fragment>
|
||||
<action
|
||||
android:id="@+id/action_global_postViewFragment"
|
||||
app:destination="@id/postViewFragment">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</action>
|
||||
|
||||
</navigation>
|
||||
|
|
@ -35,22 +35,6 @@
|
|||
app:nullable="false" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/post_view_nav_graph" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_postViewFragment"
|
||||
app:destination="@id/post_view_nav_graph">
|
||||
<argument
|
||||
android:name="index"
|
||||
app:argType="integer" />
|
||||
<argument
|
||||
android:name="idOrCodeArray"
|
||||
app:argType="string[]" />
|
||||
<argument
|
||||
android:name="isId"
|
||||
app:argType="boolean" />
|
||||
</action>
|
||||
|
||||
<include app:graph="@navigation/comments_nav_graph" />
|
||||
|
||||
<action
|
||||
|
|
|
|||
|
|
@ -325,6 +325,7 @@
|
|||
<string name="delete">Delete</string>
|
||||
<string name="comment">Comment</string>
|
||||
<string name="layout">Layout</string>
|
||||
<string name="opening_post">Opening post...</string>
|
||||
<plurals name="likes_count">
|
||||
<item quantity="one">%d like</item>
|
||||
<item quantity="other">%d likes</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue