reformat code

This commit is contained in:
Ammar Githam 2020-08-16 06:00:30 +09:00
parent 6c478d8626
commit 4e00d02f17
2 changed files with 17 additions and 19 deletions

View File

@ -12,15 +12,10 @@ import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.io.DataOutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
import awais.instagrabber.R;
import awais.instagrabber.adapters.MessageItemsAdapter;
@ -40,8 +35,6 @@ import awais.instagrabber.models.enums.UserInboxDirection;
import awais.instagrabber.utils.Constants;
import awais.instagrabber.utils.Utils;
import static awais.instagrabber.utils.Utils.settingsHelper;
public final class DirectMessageThread extends BaseLanguageActivity {
private DirectItemModel directItemModel;
private final ProfileModel myProfileHolder = ProfileModel.getDefaultProfileModel();
@ -61,7 +54,8 @@ public final class DirectMessageThread extends BaseLanguageActivity {
if (result != null) {
endCursor = result.getPrevCursor();
if ("MINCURSOR".equals(endCursor) || "MAXCURSOR".equals(endCursor)) endCursor = null;
if ("MINCURSOR".equals(endCursor) || "MAXCURSOR".equals(endCursor))
endCursor = null;
users.clear();
users.addAll(Arrays.asList(result.getUsers()));
@ -162,8 +156,7 @@ public final class DirectMessageThread extends BaseLanguageActivity {
.putExtra(Constants.EXTRAS_USERNAME, directItemModel.getReelShare().getReelOwnerName())
.putExtra(Constants.EXTRAS_STORIES, sms)
);
}
else if (directItemModel.getText() != null && directItemModel.getText().toString().contains("@")) {
} else if (directItemModel.getText() != null && directItemModel.getText().toString().contains("@")) {
searchUsername(directItemModel.getText().toString().split("@")[1].split(" ")[0]);
}
break;
@ -172,13 +165,10 @@ public final class DirectMessageThread extends BaseLanguageActivity {
searchUsername(directItemModel.getText().toString().split("@")[1].split(" ")[0]);
break;
default:
Log.d("austin_debug", "unsupported type "+itemType);
Log.d("austin_debug", "unsupported type " + itemType);
}
}
},
(view, text, isHashtag) -> {
searchUsername(text);
});
}, (view, text, isHashtag) -> searchUsername(text));
dmsBinding.rvDirectMessages.setAdapter(messageItemsAdapter);

View File

@ -75,17 +75,25 @@ public final class ProfileModel implements Serializable {
return hdProfilePic;
}
public long getPostCount() { return postCount; }
public long getPostCount() {
return postCount;
}
public long getFollowersCount() { return followersCount; }
public long getFollowersCount() {
return followersCount;
}
public long getFollowingCount() {
return followingCount;
}
public boolean getFollowing() { return following; }
public boolean getFollowing() {
return following;
}
public boolean getRestricted() { return restricted; }
public boolean getRestricted() {
return restricted;
}
public boolean getBlocked() {
return blocked;