1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-26 16:47:30 +00:00

add postviewv2 to dm thread, and fix sidecar video

This commit is contained in:
Austin Huang 2020-11-04 11:26:29 -05:00
parent bdcb32395b
commit 66d5ec7c2f
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 12 additions and 2 deletions

View File

@ -151,6 +151,9 @@ public final class PostFetcher extends AsyncTask<Void, Void, FeedModel> {
.setVideoViews(isChildVideo && childNode.has("video_view_count") .setVideoViews(isChildVideo && childNode.has("video_view_count")
? childNode.getLong("video_view_count") ? childNode.getLong("video_view_count")
: -1) : -1)
.setThumbnailUrl(childNode.getString("display_url"))
.setHeight(childNode.getJSONObject("dimensions").getInt("height"))
.setWidth(childNode.getJSONObject("dimensions").getInt("width"))
.build()); .build());
// DownloadUtils.checkExistence(downloadDir, customDir, true, postModels.get(i)); // DownloadUtils.checkExistence(downloadDir, customDir, true, postModels.get(i));
} }

View File

@ -58,10 +58,12 @@ import awais.instagrabber.ProfileNavGraphDirections;
import awais.instagrabber.R; import awais.instagrabber.R;
import awais.instagrabber.adapters.DirectMessageItemsAdapter; import awais.instagrabber.adapters.DirectMessageItemsAdapter;
import awais.instagrabber.asyncs.ImageUploader; import awais.instagrabber.asyncs.ImageUploader;
import awais.instagrabber.asyncs.PostFetcher;
import awais.instagrabber.asyncs.direct_messages.DirectMessageInboxThreadFetcher; import awais.instagrabber.asyncs.direct_messages.DirectMessageInboxThreadFetcher;
import awais.instagrabber.asyncs.direct_messages.DirectThreadBroadcaster; import awais.instagrabber.asyncs.direct_messages.DirectThreadBroadcaster;
import awais.instagrabber.customviews.helpers.RecyclerLazyLoader; import awais.instagrabber.customviews.helpers.RecyclerLazyLoader;
import awais.instagrabber.databinding.FragmentDirectMessagesThreadBinding; import awais.instagrabber.databinding.FragmentDirectMessagesThreadBinding;
import awais.instagrabber.fragments.PostViewV2Fragment;
import awais.instagrabber.interfaces.FetchListener; import awais.instagrabber.interfaces.FetchListener;
import awais.instagrabber.interfaces.MentionClickListener; import awais.instagrabber.interfaces.MentionClickListener;
import awais.instagrabber.models.ImageUploadOptions; import awais.instagrabber.models.ImageUploadOptions;
@ -240,8 +242,13 @@ public class DirectMessageThreadFragment extends Fragment {
case MEDIA_SHARE: case MEDIA_SHARE:
case CLIP: case CLIP:
case FELIX_SHARE: case FELIX_SHARE:
final long postId = directItemModel.getMediaModel().getPk(); final String shortCode = directItemModel.getMediaModel().getCode();
// open post new PostFetcher(shortCode, feedModel -> {
final PostViewV2Fragment fragment = PostViewV2Fragment
.builder(feedModel)
.build();
fragment.show(getChildFragmentManager(), "post_view");
}).execute();
break; break;
case LINK: case LINK:
Intent linkIntent = new Intent(Intent.ACTION_VIEW); Intent linkIntent = new Intent(Intent.ACTION_VIEW);