mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-08 07:57:28 +00:00
support fb thread members
This commit is contained in:
parent
a55def53c5
commit
6a524b7616
@ -116,7 +116,7 @@ public final class CommentsFetcher extends AsyncTask<Void, Void, List<CommentMod
|
||||
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, null, null,
|
||||
null, null);
|
||||
null, null, null);
|
||||
final JSONObject likedBy = childComment.optJSONObject("edge_liked_by");
|
||||
commentModels.add(new CommentModel(childComment.getString(Constants.EXTRAS_ID),
|
||||
childComment.getString("text"),
|
||||
@ -195,7 +195,7 @@ public final class CommentsFetcher extends AsyncTask<Void, Void, List<CommentMod
|
||||
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, null, null, null,
|
||||
null);
|
||||
null, null);
|
||||
final JSONObject likedBy = comment.optJSONObject("edge_liked_by");
|
||||
final String commentId = comment.getString(Constants.EXTRAS_ID);
|
||||
final CommentModel commentModel = new CommentModel(commentId,
|
||||
@ -237,7 +237,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, null, null);
|
||||
null, null, null, null, null, null);
|
||||
|
||||
tempJsonObject = childComment.optJSONObject("edge_liked_by");
|
||||
childCommentModels.add(new CommentModel(childComment.getString(Constants.EXTRAS_ID),
|
||||
|
@ -52,6 +52,8 @@ import awais.instagrabber.models.Resource;
|
||||
import awais.instagrabber.repositories.responses.User;
|
||||
import awais.instagrabber.repositories.responses.directmessages.DirectThreadParticipantRequestsResponse;
|
||||
import awais.instagrabber.repositories.responses.directmessages.RankedRecipient;
|
||||
import awais.instagrabber.utils.TextUtils;
|
||||
import awais.instagrabber.utils.Utils;
|
||||
import awais.instagrabber.viewmodels.AppStateViewModel;
|
||||
import awais.instagrabber.viewmodels.DirectSettingsViewModel;
|
||||
import awais.instagrabber.viewmodels.factories.DirectSettingsViewModelFactory;
|
||||
@ -343,10 +345,15 @@ public class DirectMessageSettingsFragment extends Fragment implements ConfirmDi
|
||||
usersAdapter = new DirectUsersAdapter(
|
||||
inviter != null ? inviter.getPk() : -1,
|
||||
(position, user, selected) -> {
|
||||
final ProfileNavGraphDirections.ActionGlobalProfileFragment directions = ProfileNavGraphDirections
|
||||
.actionGlobalProfileFragment()
|
||||
.setUsername("@" + user.getUsername());
|
||||
NavHostFragment.findNavController(this).navigate(directions);
|
||||
if (!TextUtils.isEmpty(user.getFbId())) {
|
||||
Utils.openURL(context, "https://facebook.com/" + user.getFbId());
|
||||
}
|
||||
else {
|
||||
final ProfileNavGraphDirections.ActionGlobalProfileFragment directions = ProfileNavGraphDirections
|
||||
.actionGlobalProfileFragment()
|
||||
.setUsername("@" + user.getUsername());
|
||||
NavHostFragment.findNavController(this).navigate(directions);
|
||||
}
|
||||
},
|
||||
(position, user) -> {
|
||||
final ArrayList<Option<String>> options = viewModel.createUserOptions(user);
|
||||
|
@ -31,6 +31,8 @@ public class User implements Serializable {
|
||||
private final String profileContext;
|
||||
private final List<UserProfileContextLink> profileContextLinksWithUserIds;
|
||||
private final String socialContext;
|
||||
// if a DM member is a Facebook user, this is present
|
||||
private final String interopMessagingUserFbid;
|
||||
|
||||
public User(final long pk,
|
||||
final String username,
|
||||
@ -57,7 +59,8 @@ public class User implements Serializable {
|
||||
final HdProfilePicUrlInfo hdProfilePicUrlInfo,
|
||||
final String profileContext,
|
||||
final List<UserProfileContextLink> profileContextLinksWithUserIds,
|
||||
final String socialContext) {
|
||||
final String socialContext,
|
||||
final String interopMessagingUserFbid) {
|
||||
this.pk = pk;
|
||||
this.username = username;
|
||||
this.fullName = fullName;
|
||||
@ -84,6 +87,7 @@ public class User implements Serializable {
|
||||
this.profileContext = profileContext;
|
||||
this.profileContextLinksWithUserIds = profileContextLinksWithUserIds;
|
||||
this.socialContext = socialContext;
|
||||
this.interopMessagingUserFbid = interopMessagingUserFbid;
|
||||
}
|
||||
|
||||
public long getPk() {
|
||||
@ -194,6 +198,9 @@ public class User implements Serializable {
|
||||
return profileContextLinksWithUserIds;
|
||||
}
|
||||
|
||||
public String getFbId() {
|
||||
return interopMessagingUserFbid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
|
@ -779,7 +779,7 @@ public final class ResponseBodyUtils {
|
||||
friendshipStatus,
|
||||
owner.optBoolean("is_verified"),
|
||||
false, false, false, false, null, null, 0, 0, 0, 0, null, null, 0, null, null,
|
||||
null, null, null);
|
||||
null, null, null, null);
|
||||
}
|
||||
final String id = feedItem.getString(Constants.EXTRAS_ID);
|
||||
final ImageVersions2 imageVersions2 = new ImageVersions2(
|
||||
|
@ -246,6 +246,7 @@ public class GraphQLService extends BaseService {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
));
|
||||
// userModels.add(new ProfileModel(userObject.optBoolean("is_private"),
|
||||
@ -340,6 +341,7 @@ public class GraphQLService extends BaseService {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null));
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG, "onResponse", e);
|
||||
|
@ -176,6 +176,7 @@ public class StoriesService extends BaseService {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
final String id = node.getString("id");
|
||||
@ -238,6 +239,7 @@ public class StoriesService extends BaseService {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
final String id = node.getString("id");
|
||||
|
Loading…
Reference in New Issue
Block a user