From 2f30eec0a3c07aaa9d5736494d84fe986f16186b Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Mon, 27 Jul 2020 11:29:13 -0400 Subject: [PATCH] v16.9 part whatever --- .../java/awais/instagrabber/MainHelper.java | 2 +- .../activities/DirectMessagesUserInbox.java | 2 +- .../awais/instagrabber/activities/Main.java | 2 +- .../instagrabber/activities/PostViewer.java | 50 ++++++++++++++----- .../adapters/MessageItemsAdapter.java | 2 +- .../instagrabber/asyncs/CommentsFetcher.java | 6 +-- .../instagrabber/asyncs/FeedFetcher.java | 4 +- .../asyncs/FeedStoriesFetcher.java | 2 +- .../instagrabber/asyncs/PostFetcher.java | 9 ++-- .../instagrabber/asyncs/ProfileFetcher.java | 4 +- .../instagrabber/models/BasePostModel.java | 12 +---- .../awais/instagrabber/models/PostModel.java | 5 -- .../instagrabber/models/ProfileModel.java | 16 ++++-- .../instagrabber/models/ViewerPostModel.java | 16 +++++- .../awais/instagrabber/utils/LocaleUtils.java | 2 + .../java/awais/instagrabber/utils/Utils.java | 3 ++ app/src/main/res/values-zh/arrays.xml | 4 +- app/src/main/res/values-zh/strings.xml | 28 ++++++----- app/src/main/res/values/strings.xml | 5 +- fastlane/metadata/android/changelogs/34.txt | 8 +-- 20 files changed, 114 insertions(+), 68 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/MainHelper.java b/app/src/main/java/awais/instagrabber/MainHelper.java index d280c03a..42073157 100755 --- a/app/src/main/java/awais/instagrabber/MainHelper.java +++ b/app/src/main/java/awais/instagrabber/MainHelper.java @@ -870,7 +870,7 @@ public final class MainHelper implements SwipeRefreshLayout.OnRefreshListener { main.mainBinding.mainFullName.setSelected(true); main.mainBinding.mainBiography.setEnabled(true); - if (!profileModel.isPrivate()) { + if (!profileModel.isReallyPrivate()) { main.mainBinding.mainFollowing.setClickable(true); main.mainBinding.mainFollowers.setClickable(true); main.mainBinding.privatePage.setVisibility(View.GONE); diff --git a/app/src/main/java/awais/instagrabber/activities/DirectMessagesUserInbox.java b/app/src/main/java/awais/instagrabber/activities/DirectMessagesUserInbox.java index 49459862..e27b63d1 100755 --- a/app/src/main/java/awais/instagrabber/activities/DirectMessagesUserInbox.java +++ b/app/src/main/java/awais/instagrabber/activities/DirectMessagesUserInbox.java @@ -42,7 +42,7 @@ import awais.instagrabber.utils.Utils; public final class DirectMessagesUserInbox extends AppCompatActivity { private DirectItemModel directItemModel; private final ProfileModel myProfileHolder = - new ProfileModel(false, false, null, null, null, null, null, null, null, 0, 0, 0, false, false, false, false); + new ProfileModel(false, false, false, null, null, null, null, null, null, null, 0, 0, 0, false, false, false, false); private final ArrayList users = new ArrayList<>(); private final ArrayList directItemModels = new ArrayList<>(); private final FetchListener fetchListener = new FetchListener() { diff --git a/app/src/main/java/awais/instagrabber/activities/Main.java b/app/src/main/java/awais/instagrabber/activities/Main.java index 0ea31150..b8b4a532 100755 --- a/app/src/main/java/awais/instagrabber/activities/Main.java +++ b/app/src/main/java/awais/instagrabber/activities/Main.java @@ -317,7 +317,7 @@ public final class Main extends BaseLanguageActivity { searchView.setQueryHint(getResources().getString(R.string.action_search)); searchView.setSuggestionsAdapter(suggestionAdapter); searchView.setOnSearchClickListener(v -> { - searchView.setQuery(userQuery.equals(cookieModel.getUsername()) ? "" : userQuery, false); + searchView.setQuery((cookieModel != null && userQuery.equals(cookieModel.getUsername())) ? "" : userQuery, false); menu.findItem(R.id.action_about).setVisible(false); menu.findItem(R.id.action_settings).setVisible(false); menu.findItem(R.id.action_dms).setVisible(false); diff --git a/app/src/main/java/awais/instagrabber/activities/PostViewer.java b/app/src/main/java/awais/instagrabber/activities/PostViewer.java index ade8a824..29606d1f 100755 --- a/app/src/main/java/awais/instagrabber/activities/PostViewer.java +++ b/app/src/main/java/awais/instagrabber/activities/PostViewer.java @@ -139,11 +139,14 @@ public final class PostViewer extends BaseLanguageActivity { iconRes = R.drawable.ic_fullscreen_exit; topPanelRoot.setVisibility(View.GONE); viewerBinding.btnDownload.setVisibility(View.VISIBLE); + viewerBinding.bottomPanel.tvPostDate.setVisibility(View.GONE); } else { containerLayoutParams.weight = (viewerBinding.mediaList.getVisibility() == View.VISIBLE) ? 1.35f : 1.9f; + containerLayoutParams.weight += (Utils.isEmpty(settingsHelper.getString(Constants.COOKIE))) ? 0.3f : 0; iconRes = R.drawable.ic_fullscreen; topPanelRoot.setVisibility(View.VISIBLE); viewerBinding.btnDownload.setVisibility(View.GONE); + viewerBinding.bottomPanel.tvPostDate.setVisibility(View.VISIBLE); } viewerBinding.ivToggleFullScreen.setImageResource(iconRes); @@ -203,7 +206,19 @@ public final class PostViewer extends BaseLanguageActivity { resources = getResources(); final View viewStoryPost = findViewById(R.id.viewStoryPost); - if (viewStoryPost != null) viewStoryPost.setVisibility(View.GONE); + if (viewStoryPost != null) { + viewStoryPost.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + if (profileModel.isPrivate()) + Toast.makeText(getApplicationContext(), R.string.share_private_post, Toast.LENGTH_LONG).show(); + Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); + sharingIntent.setType("text/plain"); + sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, "https://instagram.com/p/"+postShortCode); + startActivity(Intent.createChooser(sharingIntent, + (profileModel.isPrivate()) ? getString(R.string.share_private_post) : getString(R.string.share_public_post))); + } + }); + } viewerBinding.topPanel.title.setMovementMethod(new LinkMovementMethod()); viewerBinding.topPanel.title.setMentionClickListener((view, text, isHashtag) -> @@ -218,7 +233,7 @@ public final class PostViewer extends BaseLanguageActivity { viewerBinding.postActions.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, 0, 0 )); - containerLayoutParams.weight = 2.2f; + containerLayoutParams.weight = (containerLayoutParams.weight == 3.3f) ? 3.3f : 2.2f; viewerBinding.container.setLayoutParams(containerLayoutParams); } else { @@ -339,6 +354,21 @@ public final class PostViewer extends BaseLanguageActivity { viewerBinding.mediaList.setVisibility(View.VISIBLE); } + final View viewStoryPost = findViewById(R.id.viewStoryPost); + if (viewStoryPost != null) { + viewStoryPost.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + if (profileModel.isPrivate()) + Toast.makeText(getApplicationContext(), R.string.share_private_post, Toast.LENGTH_LONG).show(); + Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); + sharingIntent.setType("text/plain"); + sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, "https://instagram.com/p/"+postModel.getShortCode()); + startActivity(Intent.createChooser(sharingIntent, + (profileModel.isPrivate()) ? getString(R.string.share_private_post) : getString(R.string.share_public_post))); + } + }); + } + viewerCaptionParent.setOnTouchListener(gestureTouchListener); viewerBinding.playerView.setOnTouchListener(gestureTouchListener); viewerBinding.imageViewer.setOnSingleFlingListener((e1, e2, velocityX, velocityY) -> { @@ -560,10 +590,6 @@ public final class PostViewer extends BaseLanguageActivity { } lastSlidePos = slidePos; - containerLayoutParams.weight = (viewerBinding.mediaList.getVisibility() == View.VISIBLE) ? 1.35f : 1.9f; - containerLayoutParams.weight += (Utils.isEmpty(settingsHelper.getString(Constants.COOKIE))) ? 0.3f : 0; - viewerBinding.container.setLayoutParams(containerLayoutParams); - postCaption = viewerPostModel.getPostCaption(); if (Utils.hasMentions(postCaption)) { @@ -588,12 +614,12 @@ public final class PostViewer extends BaseLanguageActivity { postModel.setLike(viewerPostModel.getLike()); postModel.setBookmark(viewerPostModel.getBookmark()); if (viewerPostModel.getLike() == true) { - viewerBinding.btnLike.setText(resources.getString(R.string.unlike, postModel.getLikes())); + viewerBinding.btnLike.setText(resources.getString(R.string.unlike, viewerPostModel.getLikes())); viewerBinding.btnLike.setBackgroundTintList(ColorStateList.valueOf(resources.getColor( R.color.btn_pink_background, null))); } else { - viewerBinding.btnLike.setText(resources.getString(R.string.like, postModel.getLikes())); + viewerBinding.btnLike.setText(resources.getString(R.string.like, viewerPostModel.getLikes())); viewerBinding.btnLike.setBackgroundTintList(ColorStateList.valueOf(resources.getColor( R.color.btn_lightpink_background, null))); } @@ -610,7 +636,7 @@ public final class PostViewer extends BaseLanguageActivity { } viewerBinding.bottomPanel.tvPostDate.setText(viewerPostModel.getPostDate()); - viewerBinding.bottomPanel.tvPostDate.setVisibility(View.VISIBLE); + viewerBinding.bottomPanel.tvPostDate.setVisibility(containerLayoutParams.weight != 3.3f ? View.VISIBLE : View.GONE); viewerBinding.bottomPanel.tvPostDate.setSelected(true); url = viewerPostModel.getDisplayUrl(); @@ -718,7 +744,7 @@ public final class PostViewer extends BaseLanguageActivity { if (urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK) { ok = true; } - else Toast.makeText(getApplicationContext(), R.string.downloader_unknown_error, Toast.LENGTH_SHORT); + else Toast.makeText(getApplicationContext(), R.string.downloader_unknown_error, Toast.LENGTH_SHORT).show(); urlConnection.disconnect(); } catch (Throwable ex) { Log.e("austin_debug", action+": " + ex); @@ -729,8 +755,8 @@ public final class PostViewer extends BaseLanguageActivity { @Override protected void onPostExecute(Void result) { if (ok == true && action == "likes") { - viewerPostModel.setLike(!postModel.getLike()); - postModel.setManualLike(!postModel.getLike()); + postModel.setLike(!postModel.getLike()); + viewerPostModel.setManualLike(!postModel.getLike()); refreshPost(); } else if (ok == true && action == "save") { diff --git a/app/src/main/java/awais/instagrabber/adapters/MessageItemsAdapter.java b/app/src/main/java/awais/instagrabber/adapters/MessageItemsAdapter.java index 774fbe1c..3a467d0d 100755 --- a/app/src/main/java/awais/instagrabber/adapters/MessageItemsAdapter.java +++ b/app/src/main/java/awais/instagrabber/adapters/MessageItemsAdapter.java @@ -46,7 +46,7 @@ import static awais.instagrabber.models.direct_messages.DirectItemModel.RavenExp public final class MessageItemsAdapter extends RecyclerView.Adapter { private static final int MESSAGE_INCOMING = 69, MESSAGE_OUTGOING = 420; private final ProfileModel myProfileHolder = - new ProfileModel(false, false, null, null, null, null, null, null, null, 0, 0, 0, false, false, false, false); + new ProfileModel(false, false, false, null, null, null, null, null, null, null, 0, 0, 0, false, false, false, false); private final ArrayList directItemModels; private final ArrayList users; private final View.OnClickListener onClickListener; diff --git a/app/src/main/java/awais/instagrabber/asyncs/CommentsFetcher.java b/app/src/main/java/awais/instagrabber/asyncs/CommentsFetcher.java index 400859a8..31587154 100755 --- a/app/src/main/java/awais/instagrabber/asyncs/CommentsFetcher.java +++ b/app/src/main/java/awais/instagrabber/asyncs/CommentsFetcher.java @@ -109,8 +109,7 @@ public final class CommentsFetcher extends AsyncTask if (childComment != null) { final JSONObject owner = childComment.getJSONObject("owner"); - final ProfileModel profileModel = new ProfileModel(false, - false, + final ProfileModel profileModel = new ProfileModel(false, false, false, owner.getString(Constants.EXTRAS_ID), owner.getString(Constants.EXTRAS_USERNAME), null, null, null, @@ -188,7 +187,7 @@ public final class CommentsFetcher extends AsyncTask final JSONObject comment = comments.getJSONObject(i).getJSONObject("node"); final JSONObject owner = comment.getJSONObject("owner"); - final ProfileModel profileModel = new ProfileModel(false, + final ProfileModel profileModel = new ProfileModel(false, false, owner.optBoolean("is_verified"), owner.getString(Constants.EXTRAS_ID), owner.getString(Constants.EXTRAS_USERNAME), @@ -229,6 +228,7 @@ public final class CommentsFetcher extends AsyncTask tempJsonObject = childComment.getJSONObject("owner"); final ProfileModel childProfileModel = new ProfileModel(false, false, + tempJsonObject.optBoolean("is_verified"), tempJsonObject.getString(Constants.EXTRAS_ID), tempJsonObject.getString(Constants.EXTRAS_USERNAME), null, null, null, diff --git a/app/src/main/java/awais/instagrabber/asyncs/FeedFetcher.java b/app/src/main/java/awais/instagrabber/asyncs/FeedFetcher.java index 360e54d8..e1be68b5 100755 --- a/app/src/main/java/awais/instagrabber/asyncs/FeedFetcher.java +++ b/app/src/main/java/awais/instagrabber/asyncs/FeedFetcher.java @@ -98,6 +98,7 @@ public final class FeedFetcher extends AsyncTask { if (feedItem.has("owner")) { final JSONObject owner = feedItem.getJSONObject("owner"); profileModel = new ProfileModel(owner.optBoolean("is_private"), + false, // if you can see it then you def follow owner.optBoolean("is_verified"), owner.getString(Constants.EXTRAS_ID), owner.getString(Constants.EXTRAS_USERNAME), @@ -153,7 +154,8 @@ public final class FeedFetcher extends AsyncTask { node.getString(Constants.EXTRAS_ID), isChildVideo ? node.getString("video_url") : Utils.getHighQualityImage(node), null, null, null, - node.optLong("video_view_count", -1), -1, false, false); + node.optLong("video_view_count", -1), -1, false, false, + feedItem.getJSONObject("edge_media_preview_like").getLong("count")); sliderItems[j].setSliderDisplayUrl(node.getString("display_url")); } diff --git a/app/src/main/java/awais/instagrabber/asyncs/FeedStoriesFetcher.java b/app/src/main/java/awais/instagrabber/asyncs/FeedStoriesFetcher.java index ac4c35e6..56b2b634 100755 --- a/app/src/main/java/awais/instagrabber/asyncs/FeedStoriesFetcher.java +++ b/app/src/main/java/awais/instagrabber/asyncs/FeedStoriesFetcher.java @@ -56,7 +56,7 @@ public final class FeedStoriesFetcher extends AsyncTask endCursor = commentObject.optString("end_cursor"); if (mediaItemType != MediaItemType.MEDIA_TYPE_SLIDER) { - Log.d("austin_debug", "m: "+media); final ViewerPostModel postModel = new ViewerPostModel(mediaItemType, media.getString(Constants.EXTRAS_ID), isVideo ? media.getString("video_url") : Utils.getHighQualityImage(media), @@ -89,7 +88,8 @@ public final class PostFetcher extends AsyncTask Utils.isEmpty(postCaption) ? null : postCaption, username, isVideo && media.has("video_view_count") ? media.getLong("video_view_count") : -1, - timestamp, media.getBoolean("viewer_has_liked"), media.getBoolean("viewer_has_saved")); + timestamp, media.getBoolean("viewer_has_liked"), media.getBoolean("viewer_has_saved"), + media.getJSONObject("edge_media_preview_like").getLong("count")); postModel.setCommentsCount(commentsCount); postModel.setCommentsEndCursor(endCursor); @@ -107,13 +107,14 @@ public final class PostFetcher extends AsyncTask final boolean isChildVideo = node.getBoolean("is_video"); postModels[i] = new ViewerPostModel(isChildVideo ? MediaItemType.MEDIA_TYPE_VIDEO : MediaItemType.MEDIA_TYPE_IMAGE, - node.getString(Constants.EXTRAS_ID), + media.getString(Constants.EXTRAS_ID), isChildVideo ? node.getString("video_url") : Utils.getHighQualityImage(node), node.getString(Constants.EXTRAS_SHORTCODE), postCaption, username, isChildVideo && node.has("video_view_count") ? node.getLong("video_view_count") : -1, - timestamp, media.getBoolean("viewer_has_liked"), media.getBoolean("viewer_has_saved")); + timestamp, media.getBoolean("viewer_has_liked"), media.getBoolean("viewer_has_saved"), + media.getJSONObject("edge_media_preview_like").getLong("count")); postModels[i].setSliderDisplayUrl(node.getString("display_url")); Utils.checkExistence(downloadDir, customDir, username, true, i, postModels[i]); diff --git a/app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java b/app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java index bfc82e24..a063b20f 100755 --- a/app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java +++ b/app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java @@ -43,16 +43,18 @@ public final class ProfileFetcher extends AsyncTask { final JSONObject user = new JSONObject(Utils.readFromConnection(conn)).getJSONObject("graphql").getJSONObject(Constants.EXTRAS_USER); boolean isPrivate = user.getBoolean("is_private"); + boolean reallyPrivate = isPrivate; final JSONObject timelineMedia = user.getJSONObject("edge_owner_to_timeline_media"); if (timelineMedia.has("edges")) { final JSONArray edges = timelineMedia.getJSONArray("edges"); - if (edges.length() > 0) isPrivate = false; + if (edges.length() > 0) reallyPrivate = false; } String url = user.optString("external_url"); if (Utils.isEmpty(url)) url = null; result = new ProfileModel(isPrivate, + reallyPrivate, user.getBoolean("is_verified"), user.getString(Constants.EXTRAS_ID), userName, diff --git a/app/src/main/java/awais/instagrabber/models/BasePostModel.java b/app/src/main/java/awais/instagrabber/models/BasePostModel.java index a891fb75..f57e3153 100755 --- a/app/src/main/java/awais/instagrabber/models/BasePostModel.java +++ b/app/src/main/java/awais/instagrabber/models/BasePostModel.java @@ -19,14 +19,11 @@ public abstract class BasePostModel implements Serializable { protected long timestamp; protected int position; boolean liked, bookmarked; - long likes; public boolean getLike() { return liked; } - public long getLikes() { - return likes; - } + public boolean getBookmark() { return bookmarked; } @@ -35,13 +32,6 @@ public abstract class BasePostModel implements Serializable { liked = like; return liked; } - // setManualLike means user liked from InstaGrabber - public boolean setManualLike(final boolean like) { - liked = like; - likes = (like) ? (likes + 1) : (likes - 1); - return liked; - } - public boolean setBookmark(final boolean bookmark) { bookmarked = bookmark; return bookmarked; } diff --git a/app/src/main/java/awais/instagrabber/models/PostModel.java b/app/src/main/java/awais/instagrabber/models/PostModel.java index 56ce63e7..0bb34f62 100755 --- a/app/src/main/java/awais/instagrabber/models/PostModel.java +++ b/app/src/main/java/awais/instagrabber/models/PostModel.java @@ -23,7 +23,6 @@ public class PostModel extends BasePostModel { this.postCaption = postCaption; this.timestamp = timestamp; this.liked = liked; - this.likes = likes; this.bookmarked = bookmarked; } @@ -35,10 +34,6 @@ public class PostModel extends BasePostModel { return endCursor; } - public long getLikes() { - return likes; - } - public boolean hasNextPage() { return endCursor != null && hasNextPage; } diff --git a/app/src/main/java/awais/instagrabber/models/ProfileModel.java b/app/src/main/java/awais/instagrabber/models/ProfileModel.java index a28ddd7d..f3a3fa7a 100755 --- a/app/src/main/java/awais/instagrabber/models/ProfileModel.java +++ b/app/src/main/java/awais/instagrabber/models/ProfileModel.java @@ -3,15 +3,17 @@ package awais.instagrabber.models; import java.io.Serializable; public final class ProfileModel implements Serializable { - private final boolean isPrivate, isVerified, following, restricted, blocked, requested; + private final boolean isPrivate, reallyPrivate, isVerified, following, restricted, blocked, requested; private final long postCount, followersCount, followingCount; private final String id, username, name, biography, url, sdProfilePic, hdProfilePic; - public ProfileModel(final boolean isPrivate, final boolean isVerified, final String id, final String username, - final String name, final String biography, final String url, final String sdProfilePic, final String hdProfilePic, - final long postCount, final long followersCount, final long followingCount, final boolean following, - final boolean restricted, final boolean blocked, final boolean requested) { + public ProfileModel(final boolean isPrivate, final boolean reallyPrivate, + final boolean isVerified, final String id, final String username, final String name, final String biography, + final String url, final String sdProfilePic, final String hdProfilePic, final long postCount, + final long followersCount, final long followingCount, final boolean following, final boolean restricted, + final boolean blocked, final boolean requested) { this.isPrivate = isPrivate; + this.reallyPrivate = reallyPrivate; this.isVerified = isVerified; this.id = id; this.url = url; @@ -33,6 +35,10 @@ public final class ProfileModel implements Serializable { return isPrivate; } + public boolean isReallyPrivate() { + return reallyPrivate; + } + public boolean isVerified() { return isVerified; } diff --git a/app/src/main/java/awais/instagrabber/models/ViewerPostModel.java b/app/src/main/java/awais/instagrabber/models/ViewerPostModel.java index 8c254f98..c0f74b7b 100755 --- a/app/src/main/java/awais/instagrabber/models/ViewerPostModel.java +++ b/app/src/main/java/awais/instagrabber/models/ViewerPostModel.java @@ -6,12 +6,12 @@ public final class ViewerPostModel extends BasePostModel { protected final String username; protected final long videoViews; protected String sliderDisplayUrl, commentsEndCursor; - protected long commentsCount; + protected long commentsCount, likes; private boolean isCurrentSlide = false; public ViewerPostModel(final MediaItemType itemType, final String postId, final String displayUrl, final String shortCode, final String postCaption, final String username, final long videoViews, final long timestamp, - boolean liked, boolean bookmarked) { + boolean liked, boolean bookmarked, long likes) { this.itemType = itemType; this.postId = postId; this.displayUrl = displayUrl; @@ -21,6 +21,7 @@ public final class ViewerPostModel extends BasePostModel { this.videoViews = videoViews; this.timestamp = timestamp; this.liked = liked; + this.likes = likes; this.bookmarked = bookmarked; } @@ -44,6 +45,17 @@ public final class ViewerPostModel extends BasePostModel { return videoViews; } + public long getLikes() { + return likes; + } + + // setManualLike means user liked from InstaGrabber + public boolean setManualLike(final boolean like) { + liked = like; + likes = (like) ? (likes + 1) : (likes - 1); + return liked; + } + public void setSliderDisplayUrl(final String sliderDisplayUrl) { this.sliderDisplayUrl = sliderDisplayUrl; } diff --git a/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java b/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java index 77872799..a6fd1194 100755 --- a/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java +++ b/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java @@ -63,6 +63,8 @@ public final class LocaleUtils { if (appLanguageIndex == 4) return "zh"; if (appLanguageIndex == 5) return "in"; if (appLanguageIndex == 6) return "it"; + if (appLanguageIndex == 7) return "de"; + if (appLanguageIndex == 8) return "pl"; return null; } diff --git a/app/src/main/java/awais/instagrabber/utils/Utils.java b/app/src/main/java/awais/instagrabber/utils/Utils.java index 0b634fa7..68ae21b8 100755 --- a/app/src/main/java/awais/instagrabber/utils/Utils.java +++ b/app/src/main/java/awais/instagrabber/utils/Utils.java @@ -382,6 +382,7 @@ public final class Utils { if (userObj != null) { user = new ProfileModel( userObj.getBoolean("is_private"), + false, // temporary userObj.optBoolean("is_verified"), String.valueOf(userObj.get("pk")), userObj.getString("username"), @@ -459,6 +460,7 @@ public final class Utils { for (int j = 0; j < usersLen; ++j) { final JSONObject userObject = users.getJSONObject(j); userModels[j] = new ProfileModel(userObject.getBoolean("is_private"), + false, userObject.optBoolean("is_verified"), String.valueOf(userObject.get("pk")), userObject.getString("username"), @@ -608,6 +610,7 @@ public final class Utils { case PROFILE: { final JSONObject profile = itemObject.getJSONObject("profile"); profileModel = new ProfileModel(profile.getBoolean("is_private"), + false, profile.getBoolean("is_verified"), Long.toString(profile.getLong("pk")), profile.getString("username"), diff --git a/app/src/main/res/values-zh/arrays.xml b/app/src/main/res/values-zh/arrays.xml index 0dc8152f..aa91b250 100755 --- a/app/src/main/res/values-zh/arrays.xml +++ b/app/src/main/res/values-zh/arrays.xml @@ -8,8 +8,8 @@ 简体中文 印尼文 [感谢 @Galang23 (GitLab)] 意大利文 [感谢 @RAR_Ramar (Telegram)] - German [Thanks to @MoaufmKlo (GitHub)] - Polish [Thanks to @Lego8486 (GitHub)] + 德文 [感谢 @MoaufmKlo (GitHub)] + 波兰文 [感谢 @Lego8486 (GitHub)] 自动 / 跟随系统 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 013b5759..658af16d 100755 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -68,16 +68,16 @@ 参观项目页面 加入 Telegram 群组 加入 Matrix 群组 - Like (%s) - Unlike (%s) + 赞 (%s) + 取消赞 (%s) 加入收藏 解除收藏 关注 脱粉 - Add to Favorites - Remove from Favorites - Favorite - Unfavorite + 加入收藏 + 取消收藏 + 加入收藏 + 取消收藏 拉黑 解禁 限制 @@ -109,7 +109,7 @@ 你真的要删除 %s? 宽: %d\n高: %d \n色深: - Select profile picture endpoint\n(Does not affect hashtags) + 选择高清头像终端\n(不影响标签) 打开主页 查看头像 @@ -147,11 +147,11 @@ 下载文件时出错 复制用户名 复制评论 - Reply to comment - Like comment - Unlike comment - Delete comment - No empty comments, dawg! + 回复评论 + 赞评论 + 取消赞评论 + 删除评论 + 评论不得为空! 要搜索用户名吗? 要搜索标签吗? 粉丝 @@ -164,8 +164,10 @@ 成功载入 cookies!\n若你仍不能查看私密页面/帖子,重新登录! 撰写新评论... 检测到有新版本! (%s) - Reminder: If you downloaded from F-Droid, you must update from it! Same applies for GitHub. + 注意:若您下载的是F-Droid版本的,那您还得在F-Droid更新!GitHub版本也是如此。 感谢阁下更新InstaGrabber! 应用崩溃了 糟糕.. 应用崩溃了,不过别担心,你可以向开发者发送错误报告来帮助他修复问题。(: + 分享公开帖至… + 这是一个私密帖!请分享给能看到它的人! diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ab2a476e..3d3cd549 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -97,7 +97,7 @@ Successfully imported! Failed to import! Successfully exported! - Failed to export! + Failed to export! Password is empty! Password cannot be empt, dumbass! Refresh Get cookies @@ -169,6 +169,9 @@ Write a new comment... + Share this public post to... + This is a private post! Share to those who can view them! + An update is available! (%s) Reminder: If you downloaded from F-Droid, you must update from it! Same applies for GitHub. Thank you for updating InstaGrabber! diff --git a/fastlane/metadata/android/changelogs/34.txt b/fastlane/metadata/android/changelogs/34.txt index 2bdc988c..e3246905 100644 --- a/fastlane/metadata/android/changelogs/34.txt +++ b/fastlane/metadata/android/changelogs/34.txt @@ -1,6 +1,8 @@ * You can now write comments, and reply/like/delete comments through the menu (by clicking the comment) - * You're actually * Liked comments are shown with a pink background -* Post like counts are now displayed (The button texts are slightly reduced to accomodate @world_record_egg) +* You can now share posts in the post viewer +* Search field is now empty if you're viewing your own profile while logged in +* Post like counts are now displayed (The button texts are slightly reduced to accomodate @world_record_egg) (logged in only) * Mute buttons are changed to display the current status (i.e. muted icon when muted, sound icon when not muted) -* Fixed a bug relating to viewing feed stories \ No newline at end of file +* Fixed a bug relating to viewing feed stories +* Fixed a bug where scrolling in full screen causes it to quit full screen \ No newline at end of file