mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
fix #1255
This commit is contained in:
parent
1e2cf4f3a9
commit
429bcc4e91
@ -662,17 +662,21 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||||||
Toast.makeText(context, R.string.error_loading_profile, Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, R.string.error_loading_profile, Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!postsSetupDone) {
|
final long profileId = profileModel.getPk();
|
||||||
setupPosts();
|
if (!isReallyPrivate()) {
|
||||||
} else {
|
if (!postsSetupDone) {
|
||||||
binding.postsRecyclerView.refresh();
|
setupPosts();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
binding.postsRecyclerView.refresh();
|
||||||
|
}
|
||||||
|
if (isLoggedIn) {
|
||||||
|
fetchStoryAndHighlights(profileId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
profileDetailsBinding.isVerified.setVisibility(profileModel.isVerified() ? View.VISIBLE : View.GONE);
|
profileDetailsBinding.isVerified.setVisibility(profileModel.isVerified() ? View.VISIBLE : View.GONE);
|
||||||
profileDetailsBinding.isPrivate.setVisibility(profileModel.isPrivate() ? View.VISIBLE : View.GONE);
|
profileDetailsBinding.isPrivate.setVisibility(profileModel.isPrivate() ? View.VISIBLE : View.GONE);
|
||||||
final long profileId = profileModel.getPk();
|
|
||||||
if (isLoggedIn) {
|
|
||||||
fetchStoryAndHighlights(profileId);
|
|
||||||
}
|
|
||||||
setupButtons(profileId);
|
setupButtons(profileId);
|
||||||
final FavoriteRepository favoriteRepository = FavoriteRepository.getInstance(FavoriteDataSource.getInstance(getContext()));
|
final FavoriteRepository favoriteRepository = FavoriteRepository.getInstance(FavoriteDataSource.getInstance(getContext()));
|
||||||
favoriteRepository.getFavorite(profileModel.getUsername(), FavoriteType.USER, new RepositoryCallback<Favorite>() {
|
favoriteRepository.getFavorite(profileModel.getUsername(), FavoriteType.USER, new RepositoryCallback<Favorite>() {
|
||||||
@ -905,6 +909,8 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
|
|||||||
binding.privatePage1.setImageResource(R.drawable.lock);
|
binding.privatePage1.setImageResource(R.drawable.lock);
|
||||||
binding.privatePage2.setText(R.string.priv_acc);
|
binding.privatePage2.setText(R.string.priv_acc);
|
||||||
binding.privatePage.setVisibility(View.VISIBLE);
|
binding.privatePage.setVisibility(View.VISIBLE);
|
||||||
|
binding.privatePage1.setVisibility(View.VISIBLE);
|
||||||
|
binding.privatePage2.setVisibility(View.VISIBLE);
|
||||||
binding.postsRecyclerView.setVisibility(View.GONE);
|
binding.postsRecyclerView.setVisibility(View.GONE);
|
||||||
binding.swipeRefreshLayout.setRefreshing(false);
|
binding.swipeRefreshLayout.setRefreshing(false);
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
android:layout_marginTop="@dimen/private_page_margins"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
@ -48,6 +47,8 @@
|
|||||||
android:id="@+id/privatePage1"
|
android:id="@+id/privatePage1"
|
||||||
android:layout_width="@dimen/private_page_size"
|
android:layout_width="@dimen/private_page_size"
|
||||||
android:layout_height="@dimen/private_page_size"
|
android:layout_height="@dimen/private_page_size"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
app:srcCompat="@drawable/lock" />
|
app:srcCompat="@drawable/lock" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
@ -55,6 +56,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
android:text="@string/priv_acc"
|
android:text="@string/priv_acc"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -9,6 +9,13 @@
|
|||||||
motion:layout_constraintEnd_toEndOf="parent"
|
motion:layout_constraintEnd_toEndOf="parent"
|
||||||
motion:layout_constraintStart_toStartOf="parent"
|
motion:layout_constraintStart_toStartOf="parent"
|
||||||
motion:layout_constraintTop_toTopOf="parent" />
|
motion:layout_constraintTop_toTopOf="parent" />
|
||||||
|
<Constraint
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:layout_marginTop="@dimen/private_page_margins"
|
||||||
|
android:id="@+id/privatePage"
|
||||||
|
motion:layout_constraintTop_toBottomOf="@+id/header" />
|
||||||
</ConstraintSet>
|
</ConstraintSet>
|
||||||
<ConstraintSet android:id="@+id/end">
|
<ConstraintSet android:id="@+id/end">
|
||||||
<Constraint
|
<Constraint
|
||||||
|
Loading…
Reference in New Issue
Block a user