From 9830a04ec33416cd7fa97764183118c747b39d51 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Fri, 28 May 2021 21:48:59 +0900 Subject: [PATCH] Handle '@' in username in ProfileFragment. Fixes austinhuang0131/barinsta#1337 --- .../awais/instagrabber/fragments/main/ProfileFragment.java | 3 +++ 1 file changed, 3 insertions(+) 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 c6bb2d6b..12f38b1a 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java @@ -548,6 +548,9 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe if (getArguments() != null) { final ProfileFragmentArgs fragmentArgs = ProfileFragmentArgs.fromBundle(getArguments()); username = fragmentArgs.getUsername(); + if (!TextUtils.isEmpty(username) && username.startsWith("@")) { + username = username.substring(1); + } setUsernameDelayed(); } if (TextUtils.isEmpty(username) && !isLoggedIn) {