1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-16 11:47:29 +00:00

Comment out unused code

This commit is contained in:
Ammar Githam 2020-11-19 01:01:55 +09:00
parent 046152e30c
commit d0c8e9f28c

View File

@ -514,12 +514,12 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
final String userId = CookieUtils.getUserIdFromCookie(COOKIE); final String userId = CookieUtils.getUserIdFromCookie(COOKIE);
final String csrfToken = CookieUtils.getCsrfTokenFromCookie(COOKIE); final String csrfToken = CookieUtils.getCsrfTokenFromCookie(COOKIE);
v.setEnabled(false); v.setEnabled(false);
final int textRes; // final int textRes;
if (!feedModel.getLike()) { // if (!feedModel.getLike()) {
textRes = R.string.liking; // textRes = R.string.liking;
} else { // } else {
textRes = R.string.unliking; // textRes = R.string.unliking;
} // }
if (!feedModel.getLike()) { if (!feedModel.getLike()) {
mediaService.like(feedModel.getPostId(), userId, csrfToken, likeCallback); mediaService.like(feedModel.getPostId(), userId, csrfToken, likeCallback);
} else { } else {
@ -535,15 +535,15 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
private void setLikedResources(final boolean liked) { private void setLikedResources(final boolean liked) {
final int iconResource; final int iconResource;
final int tintResource; final int tintResource;
final int textResId; // final int textResId;
if (liked) { if (liked) {
iconResource = R.drawable.ic_like; iconResource = R.drawable.ic_like;
tintResource = R.color.red_600; tintResource = R.color.red_600;
textResId = R.string.unlike_without_count; // textResId = R.string.unlike_without_count;
} else { } else {
iconResource = R.drawable.ic_not_liked; iconResource = R.drawable.ic_not_liked;
tintResource = R.color.white; tintResource = R.color.white;
textResId = R.string.like_without_count; // textResId = R.string.like_without_count;
} }
binding.like.setIconResource(iconResource); binding.like.setIconResource(iconResource);
binding.like.setIconTintResource(tintResource); binding.like.setIconTintResource(tintResource);
@ -595,12 +595,12 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
final String userId = CookieUtils.getUserIdFromCookie(COOKIE); final String userId = CookieUtils.getUserIdFromCookie(COOKIE);
final String csrfToken = CookieUtils.getCsrfTokenFromCookie(COOKIE); final String csrfToken = CookieUtils.getCsrfTokenFromCookie(COOKIE);
binding.save.setEnabled(false); binding.save.setEnabled(false);
final int textRes; // final int textRes;
if (!feedModel.isSaved()) { // if (!feedModel.isSaved()) {
textRes = R.string.saving; // textRes = R.string.saving;
} else { // } else {
textRes = R.string.removing; // textRes = R.string.removing;
} // }
if (!feedModel.isSaved()) { if (!feedModel.isSaved()) {
mediaService.save(feedModel.getPostId(), userId, csrfToken, saveCallback); mediaService.save(feedModel.getPostId(), userId, csrfToken, saveCallback);
} else { } else {
@ -616,15 +616,15 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
private void setSavedResources(final boolean saved) { private void setSavedResources(final boolean saved) {
final int iconResource; final int iconResource;
final int tintResource; final int tintResource;
final int textResId; // final int textResId;
if (saved) { if (saved) {
iconResource = R.drawable.ic_class_24; iconResource = R.drawable.ic_class_24;
tintResource = R.color.blue_700; tintResource = R.color.blue_700;
textResId = R.string.saved; // textResId = R.string.saved;
} else { } else {
iconResource = R.drawable.ic_outline_class_24; iconResource = R.drawable.ic_outline_class_24;
tintResource = R.color.white; tintResource = R.color.white;
textResId = R.string.save; // textResId = R.string.save;
} }
binding.save.setIconResource(iconResource); binding.save.setIconResource(iconResource);
binding.save.setIconTintResource(tintResource); binding.save.setIconTintResource(tintResource);