diff --git a/README.md b/README.md
index 15999d16..8a5351ec 100755
--- a/README.md
+++ b/README.md
@@ -27,12 +27,12 @@ Version status: ![F-Droid](https://img.shields.io/f-droid/v/me.austinhuang.insta
## Screenshots
-
-
-
-
-
-
+
+
+
+
+
+
## We need maintainers!
diff --git a/app/build.gradle b/app/build.gradle
index ee797097..8d4c60c3 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -21,8 +21,8 @@ android {
minSdkVersion 21
targetSdkVersion 29
- versionCode 62
- versionName '19.2.1'
+ versionCode 63
+ versionName '19.2.2'
multiDexEnabled true
diff --git a/app/src/main/java/awais/instagrabber/activities/MainActivity.java b/app/src/main/java/awais/instagrabber/activities/MainActivity.java
index c081b005..b981f442 100644
--- a/app/src/main/java/awais/instagrabber/activities/MainActivity.java
+++ b/app/src/main/java/awais/instagrabber/activities/MainActivity.java
@@ -412,6 +412,7 @@ public class MainActivity extends BaseLanguageActivity implements FragmentManage
showBottomViewDestinations = currentTabs.stream()
.map(Tab::getStartDestinationFragmentId)
.collect(Collectors.toList());
+ showBottomViewDestinations.add(R.id.postViewFragment);
if (setDefaultTabFromSettings) {
setSelectedTab(currentTabs);
} else {
diff --git a/app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java b/app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java
index f8bdfb81..6521e735 100644
--- a/app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java
+++ b/app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java
@@ -88,7 +88,7 @@ public final class StoryListViewerFragment extends Fragment implements SwipeRefr
public void onHighlightClick(final HighlightModel model, final int position) {
if (model == null) return;
final NavDirections action = StoryListViewerFragmentDirections
- .actionStoryListFragmentToStoryViewerFragment(StoryViewerOptions.forStoryArchive(model.getId()));
+ .actionStoryListFragmentToStoryViewerFragment(StoryViewerOptions.forStoryArchive(position));
NavHostFragment.findNavController(StoryListViewerFragment.this).navigate(action);
}
diff --git a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java
index ad59cf06..1dca8751 100644
--- a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java
+++ b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java
@@ -132,7 +132,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
private HighlightsAdapter highlightsAdapter;
private HighlightsViewModel highlightsViewModel;
private MenuItem blockMenuItem, restrictMenuItem, chainingMenuItem;
- private MenuItem muteStoriesMenuItem, mutePostsMenuItem;
+ private MenuItem muteStoriesMenuItem, mutePostsMenuItem, removeFollowerMenuItem;
private boolean accountIsUpdated = false;
private boolean postsSetupDone = false;
private Set selectedFeedModels;
@@ -141,6 +141,23 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
private long myId;
private PostsLayoutPreferences layoutPreferences = Utils.getPostsLayoutPreferences(Constants.PREF_PROFILE_POSTS_LAYOUT);
+ private final ServiceCallback changeCb = new ServiceCallback() {
+ @Override
+ public void onSuccess(final FriendshipChangeResponse result) {
+ if (result.getFriendshipStatus() != null) {
+ profileModel.setFriendshipStatus(result.getFriendshipStatus());
+ setProfileDetails();
+ return;
+ }
+ fetchProfileDetails();
+ }
+
+ @Override
+ public void onFailure(final Throwable t) {
+ Log.e(TAG, "Error editing relationship", t);
+ }
+ };
+
private final Runnable usernameSettingRunnable = () -> {
final ActionBar actionBar = fragmentActivity.getSupportActionBar();
if (actionBar != null && !TextUtils.isEmpty(username)) {
@@ -374,8 +391,9 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
@Override
public void onCreateOptionsMenu(@NonNull final Menu menu, @NonNull final MenuInflater inflater) {
inflater.inflate(R.menu.profile_menu, menu);
+ final boolean isNotMe = profileModel != null && isLoggedIn
+ && !Objects.equals(profileModel.getPk(), CookieUtils.getUserIdFromCookie(cookie));
blockMenuItem = menu.findItem(R.id.block);
- final boolean isNotMe = profileModel != null && !Objects.equals(profileModel.getPk(), CookieUtils.getUserIdFromCookie(cookie));
if (blockMenuItem != null) {
if (isNotMe) {
blockMenuItem.setVisible(true);
@@ -415,6 +433,10 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
if (chainingMenuItem != null) {
chainingMenuItem.setVisible(isNotMe && profileModel.hasChaining());
}
+ removeFollowerMenuItem = menu.findItem(R.id.remove_follower);
+ if (removeFollowerMenuItem != null) {
+ removeFollowerMenuItem.setVisible(isNotMe && profileModel.getFriendshipStatus().isFollowedBy());
+ }
}
@Override
@@ -445,37 +467,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
}
if (item.getItemId() == R.id.block) {
if (!isLoggedIn) return false;
- if (profileModel.getFriendshipStatus().isBlocking()) {
- friendshipService.unblock(
- profileModel.getPk(),
- new ServiceCallback() {
- @Override
- public void onSuccess(final FriendshipChangeResponse result) {
- Log.d(TAG, "Unblock success: " + result);
- fetchProfileDetails();
- }
-
- @Override
- public void onFailure(final Throwable t) {
- Log.e(TAG, "Error unblocking", t);
- }
- });
- return true;
- }
- friendshipService.block(
- profileModel.getPk(),
- new ServiceCallback() {
- @Override
- public void onSuccess(final FriendshipChangeResponse result) {
- Log.d(TAG, "Block success: " + result);
- fetchProfileDetails();
- }
-
- @Override
- public void onFailure(final Throwable t) {
- Log.e(TAG, "Error blocking", t);
- }
- });
+ friendshipService.changeBlock(profileModel.getFriendshipStatus().isBlocking(), profileModel.getPk(), changeCb);
return true;
}
if (item.getItemId() == R.id.chaining) {
@@ -493,18 +485,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
profileModel.getFriendshipStatus().isMutingReel(),
profileModel.getPk(),
true,
- new ServiceCallback() {
- @Override
- public void onSuccess(final FriendshipChangeResponse result) {
- Log.d(TAG, action + " success: " + result);
- fetchProfileDetails();
- }
-
- @Override
- public void onFailure(final Throwable t) {
- Log.e(TAG, "Error while performing " + action, t);
- }
- });
+ changeCb);
return true;
}
if (item.getItemId() == R.id.mute_posts) {
@@ -514,18 +495,12 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
profileModel.getFriendshipStatus().isMuting(),
profileModel.getPk(),
false,
- new ServiceCallback() {
- @Override
- public void onSuccess(final FriendshipChangeResponse result) {
- Log.d(TAG, action + " success: " + result);
- fetchProfileDetails();
- }
-
- @Override
- public void onFailure(final Throwable t) {
- Log.e(TAG, "Error while performing " + action, t);
- }
- });
+ changeCb);
+ return true;
+ }
+ if (item.getItemId() == R.id.remove_follower) {
+ if (!isLoggedIn) return false;
+ friendshipService.removeFollower(profileModel.getPk(), changeCb);
return true;
}
return super.onOptionsItemSelected(item);
@@ -973,6 +948,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
profileDetailsBinding.mainStatus.setText(R.string.status_mutual);
}
}
+ else profileDetailsBinding.mainStatus.setVisibility(View.GONE);
if (profileModel.getFriendshipStatus().isFollowing()) {
profileDetailsBinding.btnFollow.setText(R.string.unfollow);
profileDetailsBinding.btnFollow.setChipIconResource(R.drawable.ic_outline_person_add_disabled_24);
@@ -1002,6 +978,9 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
if (chainingMenuItem != null) {
chainingMenuItem.setVisible(profileModel.hasChaining());
}
+ if (removeFollowerMenuItem != null) {
+ removeFollowerMenuItem.setVisible(profileModel.getFriendshipStatus().isFollowedBy());
+ }
}
}
@@ -1069,52 +1048,13 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
.setTitle(R.string.priv_acc)
.setMessage(R.string.priv_acc_confirm)
.setPositiveButton(R.string.confirm, (d, w) ->
- friendshipService.unfollow(
- profileModel.getPk(),
- new ServiceCallback() {
- @Override
- public void onSuccess(final FriendshipChangeResponse result) {
- // Log.d(TAG, "Unfollow success: " + result);
- fetchProfileDetails();
- }
-
- @Override
- public void onFailure(final Throwable t) {
- Log.e(TAG, "Error unfollowing", t);
- }
- }))
+ friendshipService.unfollow(profileModel.getPk(), changeCb))
.setNegativeButton(R.string.cancel, null)
.show();
} else if (profileModel.getFriendshipStatus().isFollowing() || profileModel.getFriendshipStatus().isOutgoingRequest()) {
- friendshipService.unfollow(
- profileModel.getPk(),
- new ServiceCallback() {
- @Override
- public void onSuccess(final FriendshipChangeResponse result) {
- // Log.d(TAG, "Unfollow success: " + result);
- fetchProfileDetails();
- }
-
- @Override
- public void onFailure(final Throwable t) {
- Log.e(TAG, "Error unfollowing", t);
- }
- });
+ friendshipService.unfollow(profileModel.getPk(), changeCb);
} else {
- friendshipService.follow(
- profileModel.getPk(),
- new ServiceCallback() {
- @Override
- public void onSuccess(final FriendshipChangeResponse result) {
- // Log.d(TAG, "Follow success: " + result);
- fetchProfileDetails();
- }
-
- @Override
- public void onFailure(final Throwable t) {
- Log.e(TAG, "Error following", t);
- }
- });
+ friendshipService.follow(profileModel.getPk(), changeCb);
}
});
profileDetailsBinding.btnSaved.setOnClickListener(v -> {
diff --git a/app/src/main/java/awais/instagrabber/managers/ThreadManager.java b/app/src/main/java/awais/instagrabber/managers/ThreadManager.java
index 6a81e3dc..a1e55dc7 100644
--- a/app/src/main/java/awais/instagrabber/managers/ThreadManager.java
+++ b/app/src/main/java/awais/instagrabber/managers/ThreadManager.java
@@ -1597,7 +1597,7 @@ public final class ThreadManager {
public LiveData> blockUser(final User user) {
final MutableLiveData> data = new MutableLiveData<>();
if (user == null) return data;
- friendshipService.block(user.getPk(), new ServiceCallback() {
+ friendshipService.changeBlock(false, user.getPk(), new ServiceCallback() {
@Override
public void onSuccess(final FriendshipChangeResponse result) {
refreshChats();
@@ -1615,7 +1615,7 @@ public final class ThreadManager {
public LiveData> unblockUser(final User user) {
final MutableLiveData> data = new MutableLiveData<>();
if (user == null) return data;
- friendshipService.unblock(user.getPk(), new ServiceCallback() {
+ friendshipService.changeBlock(true, user.getPk(), new ServiceCallback() {
@Override
public void onSuccess(final FriendshipChangeResponse result) {
refreshChats();
diff --git a/app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java b/app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java
index d8308c8a..901e8463 100644
--- a/app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java
+++ b/app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java
@@ -61,6 +61,10 @@ public class StoryViewerOptions implements Serializable {
return new StoryViewerOptions(id, Type.STORY_ARCHIVE);
}
+ public static StoryViewerOptions forStoryArchive(final int position) {
+ return new StoryViewerOptions(position, Type.STORY_ARCHIVE);
+ }
+
public long getId() {
return id;
}
diff --git a/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java b/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java
index bdf00582..7b623bc5 100755
--- a/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java
+++ b/app/src/main/java/awais/instagrabber/utils/LocaleUtils.java
@@ -82,8 +82,10 @@ public final class LocaleUtils {
case 20: return "ja";
case 21: return "el";
case 22: return "eu";
+ case 23: return "sv";
+ case 24: return "ko";
}
return null;
}
-}
\ No newline at end of file
+}
diff --git a/app/src/main/java/awais/instagrabber/webservices/FriendshipService.java b/app/src/main/java/awais/instagrabber/webservices/FriendshipService.java
index ced49305..c363a865 100644
--- a/app/src/main/java/awais/instagrabber/webservices/FriendshipService.java
+++ b/app/src/main/java/awais/instagrabber/webservices/FriendshipService.java
@@ -78,14 +78,10 @@ public class FriendshipService extends BaseService {
change("destroy", targetUserId, callback);
}
- public void block(final long targetUserId,
- final ServiceCallback callback) {
- change("block", targetUserId, callback);
- }
-
- public void unblock(final long targetUserId,
- final ServiceCallback callback) {
- change("unblock", targetUserId, callback);
+ public void changeBlock(final boolean unblock,
+ final long targetUserId,
+ final ServiceCallback callback) {
+ change(unblock ? "unblock" : "block", targetUserId, callback);
}
public void toggleRestrict(final long targetUserId,
@@ -126,6 +122,11 @@ public class FriendshipService extends BaseService {
change("ignore", targetUserId, callback);
}
+ public void removeFollower(final long targetUserId,
+ final ServiceCallback callback) {
+ change("remove_follower", targetUserId, callback);
+ }
+
private void change(final String action,
final long targetUserId,
final ServiceCallback callback) {
diff --git a/app/src/main/res/layout/dialog_post_view.xml b/app/src/main/res/layout/dialog_post_view.xml
index fa67ecdf..ccbec7a5 100644
--- a/app/src/main/res/layout/dialog_post_view.xml
+++ b/app/src/main/res/layout/dialog_post_view.xml
@@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?colorSurface"
+ android:paddingBottom="?attr/actionBarSize"
tools:context=".fragments.PostViewV2Fragment">
+
+
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index d01e496f..fc15b2eb 100755
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -24,6 +24,8 @@
- 日本語
- Ελληνικά
- Euskara
+ - Svenska
+ - 한국어
- Auto / Follow System
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1a841598..89fb969d 100755
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -126,6 +126,7 @@
Mute posts
Unmute stories
Unmute posts
+ Remove follower
Copy bio
Translate bio
Mutual
@@ -504,7 +505,7 @@
Recent
Clear
No Map app found!
- Click to view full count
+ Click to show full like count
No profile pic found!
Are you sure you want to open this link?
diff --git a/fastlane/metadata/android/en-US/changelogs/63.txt b/fastlane/metadata/android/en-US/changelogs/63.txt
new file mode 100644
index 00000000..0aade425
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/63.txt
@@ -0,0 +1,3 @@
+Search history, new comments/posts layout, and various improvements!
+
+For details see https://github.com/austinhuang0131/barinsta/releases/tag/v19.2.2
\ No newline at end of file
diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt
index 607d15dd..8328dbeb 100755
--- a/fastlane/metadata/android/en-US/full_description.txt
+++ b/fastlane/metadata/android/en-US/full_description.txt
@@ -1,6 +1,6 @@
If you don't upload posts or stories on Instagram, but can't get rid of it because of people and contents, you now have an alternative: Barinsta is a beautiful client that allows you to browse and interact with Instagram, while giving you more options to control your data.
-* For those not having an account, you can access public profiles/hashtags/locations!
+* For those not having an account, you can access public profiles/hashtags/locations (depends on availability)!
* For those logged in, Barinsta can achieve most viewing and interaction features, with extra features such as downloading posts/stories/avatars, copying texts, comparing followers/following, and more!
Extra merits:
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg
deleted file mode 100644
index 91ff7261..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
new file mode 100644
index 00000000..92071afa
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg
deleted file mode 100644
index 09206e07..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png
new file mode 100644
index 00000000..21cdf4a2
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg
deleted file mode 100644
index a9ee241b..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png
new file mode 100644
index 00000000..f68a5110
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/4.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/4.jpg
deleted file mode 100644
index d3952b23..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/4.jpg and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png
new file mode 100644
index 00000000..89edf0c9
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg
deleted file mode 100644
index 87c89349..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png
new file mode 100644
index 00000000..ff496361
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg
deleted file mode 100644
index 682cd1d1..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png
new file mode 100644
index 00000000..cf0a04fd
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png differ