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;
|
||||
subtext = model.getText();
|
||||
break;
|
||||
case TAGGED:
|
||||
text = R.string.tagged_notif;
|
||||
break;
|
||||
case FOLLOW:
|
||||
text = R.string.follow_notif;
|
||||
break;
|
||||
|
@ -9,10 +9,11 @@ public enum NotificationType implements Serializable {
|
||||
FOLLOW("GraphFollowAggregatedStory"),
|
||||
COMMENT("GraphCommentMediaStory"),
|
||||
MENTION("GraphMentionStory"),
|
||||
TAGGED("GraphUserTaggedStory"),
|
||||
REQUEST("REQUEST");
|
||||
|
||||
private final String itemType;
|
||||
private static Map<String, NotificationType> map = new HashMap<>();
|
||||
private static final Map<String, NotificationType> map = new HashMap<>();
|
||||
|
||||
static {
|
||||
for (NotificationType type : NotificationType.values()) {
|
||||
|
@ -185,7 +185,7 @@ public final class DownloadUtils {
|
||||
case MEDIA_TYPE_IMAGE:
|
||||
case MEDIA_TYPE_VIDEO: {
|
||||
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());
|
||||
break;
|
||||
}
|
||||
@ -194,7 +194,7 @@ public final class DownloadUtils {
|
||||
for (int i = 0; i < sliderItems.size(); i++) {
|
||||
final PostChild child = sliderItems.get(i);
|
||||
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());
|
||||
}
|
||||
break;
|
||||
@ -275,7 +275,7 @@ public final class DownloadUtils {
|
||||
case MEDIA_TYPE_IMAGE:
|
||||
case MEDIA_TYPE_VIDEO: {
|
||||
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());
|
||||
break;
|
||||
}
|
||||
@ -287,7 +287,7 @@ public final class DownloadUtils {
|
||||
}
|
||||
final PostChild child = sliderItems.get(i);
|
||||
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());
|
||||
}
|
||||
break;
|
||||
|
@ -111,7 +111,7 @@
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
android:textStyle="italic"
|
||||
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_constraintTop_toBottomOf="@id/tvSubComment"
|
||||
tools:text="some long long long long long date" />
|
||||
|
@ -225,6 +225,7 @@
|
||||
<string name="comment_notif">Commented on your post:</string>
|
||||
<string name="follow_notif">Started following 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_approve">Approve request</string>
|
||||
<string name="request_reject">Reject request</string>
|
||||
|
Loading…
Reference in New Issue
Block a user