1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-08 07:57:28 +00:00

restore hd avatar

This commit is contained in:
Austin Huang 2021-01-26 21:21:48 -05:00
parent ea7236dcc1
commit 3baa82090e
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
7 changed files with 33 additions and 6 deletions

View File

@ -115,7 +115,7 @@ public final class CommentsFetcher extends AsyncTask<Void, Void, List<CommentMod
owner.getString("profile_pic_url"),
null,
new FriendshipStatus(false, false, false, false, false, false, false, false, false, false),
false, false, false, false, false, null, null, 0, 0, 0, 0, null, null, 0, null);
false, false, false, false, false, null, null, 0, 0, 0, 0, null, null, 0, null, null);
final JSONObject likedBy = childComment.optJSONObject("edge_liked_by");
commentModels.add(new CommentModel(childComment.getString(Constants.EXTRAS_ID),
childComment.getString("text"),
@ -193,7 +193,7 @@ public final class CommentsFetcher extends AsyncTask<Void, Void, List<CommentMod
null,
new FriendshipStatus(false, false, false, false, false, false, false, false, false, false),
owner.optBoolean("is_verified"),
false, false, false, false, null, null, 0, 0, 0, 0, null, null, 0, null);
false, false, false, false, null, null, 0, 0, 0, 0, null, null, 0, null, null);
final JSONObject likedBy = comment.optJSONObject("edge_liked_by");
final String commentId = comment.getString(Constants.EXTRAS_ID);
final CommentModel commentModel = new CommentModel(commentId,
@ -235,7 +235,7 @@ public final class CommentsFetcher extends AsyncTask<Void, Void, List<CommentMod
null,
new FriendshipStatus(false, false, false, false, false, false, false, false, false, false),
tempJsonObject.optBoolean("is_verified"), false, false, false, false, null, null, 0, 0, 0, 0, null, null, 0,
null);
null, null);
tempJsonObject = childComment.optJSONObject("edge_liked_by");
childCommentModels.add(new CommentModel(childComment.getString(Constants.EXTRAS_ID),

View File

@ -120,7 +120,7 @@ public class ProfilePicDialogFragment extends DialogFragment {
@Override
public void onSuccess(final User result) {
if (result != null) {
setupPhoto(result.getProfilePicUrl());
setupPhoto(result.getHDProfilePicUrl());
}
}

View File

@ -0,0 +1,16 @@
package awais.instagrabber.repositories.responses;
public class HdProfilePicUrlInfo {
private final String url;
private final int width, height;
public HdProfilePicUrlInfo(final String url, final int width, final int height) {
this.url = url;
this.width = width;
this.height = height;
}
public String getUrl() {
return url;
}
}

View File

@ -26,6 +26,7 @@ public class User implements Serializable {
private final String externalUrl;
private final long usertagsCount;
private final String publicEmail;
private final HdProfilePicUrlInfo hdProfilePicUrlInfo;
public User(final long pk,
@ -49,7 +50,8 @@ public class User implements Serializable {
final String biography,
final String externalUrl,
final long usertagsCount,
final String publicEmail) {
final String publicEmail,
final HdProfilePicUrlInfo hdProfilePicUrlInfo) {
this.pk = pk;
this.username = username;
this.fullName = fullName;
@ -72,6 +74,7 @@ public class User implements Serializable {
this.externalUrl = externalUrl;
this.usertagsCount = usertagsCount;
this.publicEmail = publicEmail;
this.hdProfilePicUrlInfo = hdProfilePicUrlInfo;
}
public long getPk() {
@ -94,6 +97,10 @@ public class User implements Serializable {
return profilePicUrl;
}
public String getHDProfilePicUrl() {
return hdProfilePicUrlInfo.getUrl();
}
public String getProfilePicId() {
return profilePicId;
}

View File

@ -782,7 +782,7 @@ public final class ResponseBodyUtils {
null,
friendshipStatus,
owner.optBoolean("is_verified"),
false, false, false, false, null, null, 0, 0, 0, 0, null, null, 0, null);
false, false, false, false, null, null, 0, 0, 0, 0, null, null, 0, null, null);
}
final String id = feedItem.getString(Constants.EXTRAS_ID);
final ImageVersions2 imageVersions2 = new ImageVersions2(

View File

@ -242,6 +242,7 @@ public class GraphQLService extends BaseService {
null,
null,
0,
null,
null
));
// userModels.add(new ProfileModel(userObject.optBoolean("is_private"),
@ -332,6 +333,7 @@ public class GraphQLService extends BaseService {
userJson.getString("biography"),
url,
0,
null,
null));
} catch (JSONException e) {
Log.e(TAG, "onResponse", e);

View File

@ -145,6 +145,7 @@ public class StoriesService extends BaseService {
null,
null,
0,
null,
null
);
final String id = node.getString("id");
@ -201,6 +202,7 @@ public class StoriesService extends BaseService {
null,
null,
0,
null,
null
);
final String id = node.getString("id");