mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-12-23 05:16:58 +00:00
add post date, fix detail hiding, and semver
This commit is contained in:
parent
a9003b43ba
commit
4826434cca
@ -5,13 +5,13 @@ android {
|
||||
compileSdkVersion 29
|
||||
|
||||
defaultConfig {
|
||||
applicationId 'me.austinhuang.instagrabbr'
|
||||
applicationId 'me.austinhuang.instagrabber'
|
||||
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
|
||||
versionCode 52
|
||||
versionName '19.0'
|
||||
versionName '19.0.0'
|
||||
|
||||
multiDexEnabled true
|
||||
|
||||
|
@ -56,6 +56,7 @@ import com.google.android.material.snackbar.BaseTransientBottomBar;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import awais.instagrabber.R;
|
||||
import awais.instagrabber.activities.MainActivity;
|
||||
@ -666,7 +667,10 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
|
||||
|
||||
private void setupCaption() {
|
||||
final CharSequence postCaption = feedModel.getPostCaption();
|
||||
binding.date.setText(Utils.datetimeParser.format(new Date(feedModel.getTimestamp() * 1000L)));
|
||||
if (TextUtils.isEmpty(postCaption)) {
|
||||
binding.caption.setVisibility(View.GONE);
|
||||
binding.captionToggle.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
binding.caption.addOnHashtagListener(autoLinkItem -> {
|
||||
@ -1062,6 +1066,8 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
|
||||
detailsVisible = false;
|
||||
binding.profilePic.setVisibility(View.GONE);
|
||||
binding.title.setVisibility(View.GONE);
|
||||
binding.isVerified.setVisibility(View.GONE);
|
||||
binding.righttitle.setVisibility(View.GONE);
|
||||
binding.topBg.setVisibility(View.GONE);
|
||||
if (!TextUtils.isEmpty(binding.subtitle.getText())) {
|
||||
binding.subtitle.setVisibility(View.GONE);
|
||||
@ -1070,6 +1076,7 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
|
||||
binding.bottomBg.setVisibility(View.GONE);
|
||||
binding.likesCount.setVisibility(View.GONE);
|
||||
binding.commentsCount.setVisibility(View.GONE);
|
||||
binding.date.setVisibility(View.GONE);
|
||||
binding.comment.setVisibility(View.GONE);
|
||||
binding.captionToggle.setVisibility(View.GONE);
|
||||
binding.playerControlsToggle.setVisibility(View.GONE);
|
||||
@ -1086,6 +1093,8 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
|
||||
}
|
||||
binding.profilePic.setVisibility(View.VISIBLE);
|
||||
binding.title.setVisibility(View.VISIBLE);
|
||||
binding.isVerified.setVisibility(feedModel.getProfileModel().isVerified() ? View.VISIBLE : View.GONE);
|
||||
binding.righttitle.setVisibility(View.VISIBLE);
|
||||
binding.topBg.setVisibility(View.VISIBLE);
|
||||
if (!TextUtils.isEmpty(binding.subtitle.getText())) {
|
||||
binding.subtitle.setVisibility(View.VISIBLE);
|
||||
@ -1094,6 +1103,7 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
|
||||
binding.bottomBg.setVisibility(View.VISIBLE);
|
||||
binding.likesCount.setVisibility(View.VISIBLE);
|
||||
binding.commentsCount.setVisibility(View.VISIBLE);
|
||||
binding.date.setVisibility(View.VISIBLE);
|
||||
binding.captionToggle.setVisibility(View.VISIBLE);
|
||||
binding.comment.setVisibility(View.VISIBLE);
|
||||
if (video) {
|
||||
|
@ -211,7 +211,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="@id/buttons_barrier"
|
||||
app:layout_constraintBottom_toTopOf="@id/date"
|
||||
app:layout_constraintEnd_toStartOf="@id/comments_count"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -225,7 +225,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="@id/buttons_barrier"
|
||||
app:layout_constraintBottom_toTopOf="@id/date"
|
||||
app:layout_constraintEnd_toStartOf="@id/views_count"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@id/likes_count"
|
||||
@ -239,13 +239,23 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="@id/buttons_barrier"
|
||||
app:layout_constraintBottom_toTopOf="@id/date"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/comments_count"
|
||||
app:layout_constraintTop_toTopOf="@id/bottom_bg_barrier"
|
||||
tools:text="9999999999 views"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/white"
|
||||
tools:text="2020-11-07 11:18:55"
|
||||
app:layout_constraintTop_toBottomOf="@id/likes_count"
|
||||
app:layout_constraintBottom_toBottomOf="@id/buttons_barrier" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/buttons_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
|
Loading…
Reference in New Issue
Block a user