mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
parent
1fda45c01a
commit
7b4c005513
@ -119,21 +119,25 @@ public final class CommentsViewer extends BaseLanguageActivity implements SwipeR
|
||||
} else if (which == 3) {
|
||||
Utils.copyText(this, commentModel.getText().toString());
|
||||
} else if (which == 4) {
|
||||
if (commentModel == null) {
|
||||
Toast.makeText(getApplicationContext(), R.string.downloader_unknown_error, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else {
|
||||
focus = commentsBinding.rvComments.findViewWithTag(commentModel);
|
||||
focus.setBackgroundColor(0x80888888);
|
||||
commentsBinding.commentCancelParent.setVisibility(View.VISIBLE);
|
||||
String mention = "@"+profileModel.getUsername()+" ";
|
||||
String mention = "@" + profileModel.getUsername() + " ";
|
||||
commentsBinding.commentText.setText(mention);
|
||||
commentsBinding.commentText.requestFocus();
|
||||
commentsBinding.commentText.setSelection(mention.length());
|
||||
commentsBinding.commentText.postDelayed(new Runnable(){
|
||||
commentsBinding.commentText.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run(){
|
||||
public void run() {
|
||||
imm = (InputMethodManager) getSystemService(getApplicationContext().INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(commentsBinding.commentText, 0);
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
,200);
|
||||
} else if (which == 5) {
|
||||
new CommentAction().execute((commentModel.getLiked() ? "unlike/" : "like/")+commentModel.getId());
|
||||
} else if (which == 6) {
|
||||
|
@ -131,7 +131,7 @@ public final class PostsFetcher extends AsyncTask<Void, Void, PostModel[]> {
|
||||
Utils.checkExistence(downloadDir, customDir, isSlider, models[i]);
|
||||
}
|
||||
|
||||
if (models[models.length - 1] != null)
|
||||
if (models.length > 0 && models[models.length - 1] != null)
|
||||
models[models.length - 1].setPageCursor(hasNextPage, endCursor);
|
||||
|
||||
result = models;
|
||||
|
@ -67,6 +67,7 @@ import awais.instagrabber.models.direct_messages.DirectItemModel;
|
||||
import awais.instagrabber.models.direct_messages.InboxThreadModel;
|
||||
import awais.instagrabber.models.enums.DirectItemType;
|
||||
import awais.instagrabber.models.enums.DownloadMethod;
|
||||
import awais.instagrabber.models.enums.MediaItemType;
|
||||
import awais.instagrabber.models.enums.UserInboxDirection;
|
||||
import awais.instagrabber.utils.Constants;
|
||||
import awais.instagrabber.utils.Utils;
|
||||
@ -220,8 +221,12 @@ public class DirectMessageThreadFragment extends Fragment {
|
||||
case RAVEN_MEDIA:
|
||||
case MEDIA:
|
||||
final ProfileModel user = getUser(directItemModel.getUserId());
|
||||
String url = selectedItem.getMediaType() == MediaItemType.MEDIA_TYPE_VIDEO ? selectedItem.getVideoUrl() : selectedItem.getThumbUrl();
|
||||
if (url != null) {
|
||||
Utils.dmDownload(requireContext(), user.getUsername(), DownloadMethod.DOWNLOAD_DIRECT, Collections.singletonList(itemType == DirectItemType.MEDIA ? directItemModel.getMediaModel() : directItemModel.getRavenMediaModel().getMedia()));
|
||||
Toast.makeText(requireContext(), R.string.downloader_downloading_media, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else Toast.makeText(requireContext(), R.string.downloader_unknown_error, Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case STORY_SHARE:
|
||||
if (directItemModel.getReelShare() != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user