1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 06:37:30 +00:00
This commit is contained in:
Ammar Githam 2021-04-14 20:17:00 +09:00
parent de9891f368
commit 34e54837d5

View File

@ -34,7 +34,7 @@ public class Media implements Serializable {
private final boolean hasAudio; private final boolean hasAudio;
private final double videoDuration; private final double videoDuration;
private final long viewCount; private final long viewCount;
private final Caption caption; private Caption caption;
private final boolean canViewerSave; private final boolean canViewerSave;
private final Audio audio; private final Audio audio;
private final String title; private final String title;
@ -271,7 +271,14 @@ public class Media implements Serializable {
} }
public void setPostCaption(final String caption) { public void setPostCaption(final String caption) {
final Caption caption1 = getCaption(); Caption caption1 = getCaption();
if (caption1 == null) {
final User user = getUser();
if (user == null) return;
caption1 = new Caption(user.getPk(), caption);
this.caption = caption1;
return;
}
caption1.setText(caption); caption1.setText(caption);
} }