mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +00:00
Fix weird layout when keyboard is open and indexoutofbounds when fetching profile details
This commit is contained in:
parent
0de0cb233e
commit
3bf4aa86d0
@ -21,7 +21,7 @@
|
||||
android:name=".activities.MainActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=".Main"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
@ -370,6 +370,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
||||
}
|
||||
if (TextUtils.isEmpty(username) && !isLoggedIn) {
|
||||
binding.infoContainer.setVisibility(View.GONE);
|
||||
binding.swipeRefreshLayout.setEnabled(false);
|
||||
binding.privatePage1.setImageResource(R.drawable.ic_outline_info_24);
|
||||
binding.privatePage2.setText(R.string.no_acc);
|
||||
final NestedCoordinatorLayout.LayoutParams layoutParams = (NestedCoordinatorLayout.LayoutParams) binding.privatePage.getLayoutParams();
|
||||
@ -378,6 +379,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
||||
binding.privatePage.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
}
|
||||
binding.swipeRefreshLayout.setEnabled(true);
|
||||
setupPosts();
|
||||
setupHighlights();
|
||||
setupCommonListeners();
|
||||
@ -412,6 +414,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
||||
}
|
||||
|
||||
private void fetchProfileDetails() {
|
||||
if (TextUtils.isEmpty(username)) return;
|
||||
new ProfileFetcher(username.substring(1), profileModel -> {
|
||||
if (getContext() == null) return;
|
||||
this.profileModel = profileModel;
|
||||
|
Loading…
Reference in New Issue
Block a user