mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-12-23 13:26:59 +00:00
downloads use shortcode, and tagged post notification
This commit is contained in:
parent
495a4a974f
commit
c2b8d8cb4f
@ -42,6 +42,9 @@ public final class NotificationViewHolder extends RecyclerView.ViewHolder {
|
|||||||
text = R.string.mention_notif;
|
text = R.string.mention_notif;
|
||||||
subtext = model.getText();
|
subtext = model.getText();
|
||||||
break;
|
break;
|
||||||
|
case TAGGED:
|
||||||
|
text = R.string.tagged_notif;
|
||||||
|
break;
|
||||||
case FOLLOW:
|
case FOLLOW:
|
||||||
text = R.string.follow_notif;
|
text = R.string.follow_notif;
|
||||||
break;
|
break;
|
||||||
|
@ -9,10 +9,11 @@ public enum NotificationType implements Serializable {
|
|||||||
FOLLOW("GraphFollowAggregatedStory"),
|
FOLLOW("GraphFollowAggregatedStory"),
|
||||||
COMMENT("GraphCommentMediaStory"),
|
COMMENT("GraphCommentMediaStory"),
|
||||||
MENTION("GraphMentionStory"),
|
MENTION("GraphMentionStory"),
|
||||||
|
TAGGED("GraphUserTaggedStory"),
|
||||||
REQUEST("REQUEST");
|
REQUEST("REQUEST");
|
||||||
|
|
||||||
private final String itemType;
|
private final String itemType;
|
||||||
private static Map<String, NotificationType> map = new HashMap<>();
|
private static final Map<String, NotificationType> map = new HashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
for (NotificationType type : NotificationType.values()) {
|
for (NotificationType type : NotificationType.values()) {
|
||||||
|
@ -185,7 +185,7 @@ public final class DownloadUtils {
|
|||||||
case MEDIA_TYPE_IMAGE:
|
case MEDIA_TYPE_IMAGE:
|
||||||
case MEDIA_TYPE_VIDEO: {
|
case MEDIA_TYPE_VIDEO: {
|
||||||
final String url = feedModel.getDisplayUrl();
|
final String url = feedModel.getDisplayUrl();
|
||||||
final File file = getDownloadSaveFile(downloadDir, feedModel.getPostId(), url);
|
final File file = getDownloadSaveFile(downloadDir, feedModel.getShortCode(), url);
|
||||||
checkList.add(file.exists());
|
checkList.add(file.exists());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -194,7 +194,7 @@ public final class DownloadUtils {
|
|||||||
for (int i = 0; i < sliderItems.size(); i++) {
|
for (int i = 0; i < sliderItems.size(); i++) {
|
||||||
final PostChild child = sliderItems.get(i);
|
final PostChild child = sliderItems.get(i);
|
||||||
final String url = child.getDisplayUrl();
|
final String url = child.getDisplayUrl();
|
||||||
final File file = getDownloadChildSaveFile(downloadDir, feedModel.getPostId(), i + 1, url);
|
final File file = getDownloadChildSaveFile(downloadDir, feedModel.getShortCode(), i + 1, url);
|
||||||
checkList.add(file.exists());
|
checkList.add(file.exists());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -275,7 +275,7 @@ public final class DownloadUtils {
|
|||||||
case MEDIA_TYPE_IMAGE:
|
case MEDIA_TYPE_IMAGE:
|
||||||
case MEDIA_TYPE_VIDEO: {
|
case MEDIA_TYPE_VIDEO: {
|
||||||
final String url = feedModel.getDisplayUrl();
|
final String url = feedModel.getDisplayUrl();
|
||||||
final File file = getDownloadSaveFile(downloadDir, feedModel.getPostId(), url);
|
final File file = getDownloadSaveFile(downloadDir, feedModel.getShortCode(), url);
|
||||||
map.put(url, file.getAbsolutePath());
|
map.put(url, file.getAbsolutePath());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -287,7 +287,7 @@ public final class DownloadUtils {
|
|||||||
}
|
}
|
||||||
final PostChild child = sliderItems.get(i);
|
final PostChild child = sliderItems.get(i);
|
||||||
final String url = child.getDisplayUrl();
|
final String url = child.getDisplayUrl();
|
||||||
final File file = getDownloadChildSaveFile(downloadDir, feedModel.getPostId(), i + 1, url);
|
final File file = getDownloadChildSaveFile(downloadDir, feedModel.getShortCode(), i + 1, url);
|
||||||
map.put(url, file.getAbsolutePath());
|
map.put(url, file.getAbsolutePath());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||||
android:textStyle="italic"
|
android:textStyle="italic"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/preview_barrier"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvSubComment"
|
app:layout_constraintTop_toBottomOf="@id/tvSubComment"
|
||||||
tools:text="some long long long long long date" />
|
tools:text="some long long long long long date" />
|
||||||
|
@ -225,6 +225,7 @@
|
|||||||
<string name="comment_notif">Commented on your post:</string>
|
<string name="comment_notif">Commented on your post:</string>
|
||||||
<string name="follow_notif">Started following you</string>
|
<string name="follow_notif">Started following you</string>
|
||||||
<string name="mention_notif">Mentioned you:</string>
|
<string name="mention_notif">Mentioned you:</string>
|
||||||
|
<string name="tagged_notif">Tagged you in a post</string>
|
||||||
<string name="request_notif">Requested following you</string>
|
<string name="request_notif">Requested following you</string>
|
||||||
<string name="request_approve">Approve request</string>
|
<string name="request_approve">Approve request</string>
|
||||||
<string name="request_reject">Reject request</string>
|
<string name="request_reject">Reject request</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user