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

Handle '@' in username in ProfileFragment. Fixes austinhuang0131/barinsta#1337

This commit is contained in:
Ammar Githam 2021-05-28 21:48:59 +09:00
parent cf0c420801
commit 9830a04ec3

View File

@ -548,6 +548,9 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
if (getArguments() != null) { if (getArguments() != null) {
final ProfileFragmentArgs fragmentArgs = ProfileFragmentArgs.fromBundle(getArguments()); final ProfileFragmentArgs fragmentArgs = ProfileFragmentArgs.fromBundle(getArguments());
username = fragmentArgs.getUsername(); username = fragmentArgs.getUsername();
if (!TextUtils.isEmpty(username) && username.startsWith("@")) {
username = username.substring(1);
}
setUsernameDelayed(); setUsernameDelayed();
} }
if (TextUtils.isEmpty(username) && !isLoggedIn) { if (TextUtils.isEmpty(username) && !isLoggedIn) {