From 0023c566888afe1f4200f036e92cce37af00e8c3 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Sun, 16 Aug 2020 06:08:25 +0900 Subject: [PATCH] rename variables to camelCase --- .../activities/DirectMessageThread.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/activities/DirectMessageThread.java b/app/src/main/java/awais/instagrabber/activities/DirectMessageThread.java index abe771da..3574856e 100644 --- a/app/src/main/java/awais/instagrabber/activities/DirectMessageThread.java +++ b/app/src/main/java/awais/instagrabber/activities/DirectMessageThread.java @@ -37,14 +37,14 @@ import awais.instagrabber.utils.Utils; public final class DirectMessageThread extends BaseLanguageActivity { private DirectItemModel directItemModel; - private String threadid; + private String threadId; private String endCursor; private ActivityDmsBinding dmsBinding; private MessageItemsAdapter messageItemsAdapter; private final ProfileModel myProfileHolder = ProfileModel.getDefaultProfileModel(); private final ArrayList users = new ArrayList<>(); - private final ArrayList leftusers = new ArrayList<>(); + private final ArrayList leftUsers = new ArrayList<>(); private final ArrayList directItemModels = new ArrayList<>(); private final FetchListener fetchListener = new FetchListener() { @Override @@ -65,10 +65,10 @@ public final class DirectMessageThread extends BaseLanguageActivity { users.clear(); users.addAll(Arrays.asList(result.getUsers())); - leftusers.clear(); - leftusers.addAll(Arrays.asList(result.getLeftUsers())); + leftUsers.clear(); + leftUsers.addAll(Arrays.asList(result.getLeftUsers())); - threadid = result.getThreadId(); + threadId = result.getThreadId(); dmsBinding.toolbar.toolbar.setTitle(result.getThreadTitle()); String[] users = new String[result.getUsers().length]; for (int i = 0; i < users.length; ++i) { @@ -90,7 +90,7 @@ public final class DirectMessageThread extends BaseLanguageActivity { Toast.makeText(getApplicationContext(), R.string.comment_send_empty_comment, Toast.LENGTH_SHORT).show(); return; } - final CommentAction action = new CommentAction(dmsBinding.commentText.getText().toString(), threadid); + final CommentAction action = new CommentAction(dmsBinding.commentText.getText().toString(), threadId); action.setOnTaskCompleteListener(result -> { if (!result) { Toast.makeText(getApplicationContext(), R.string.downloader_unknown_error, Toast.LENGTH_SHORT).show(); @@ -100,7 +100,7 @@ public final class DirectMessageThread extends BaseLanguageActivity { dmsBinding.commentText.clearFocus(); directItemModels.clear(); messageItemsAdapter.notifyDataSetChanged(); - new UserInboxFetcher(threadid, UserInboxDirection.OLDER, null, fetchListener).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new UserInboxFetcher(threadId, UserInboxDirection.OLDER, null, fetchListener).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }); action.execute(); }; @@ -134,7 +134,7 @@ public final class DirectMessageThread extends BaseLanguageActivity { } })); - messageItemsAdapter = new MessageItemsAdapter(directItemModels, users, leftusers, v -> { + messageItemsAdapter = new MessageItemsAdapter(directItemModels, users, leftUsers, v -> { Object tag = v.getTag(); if (tag instanceof DirectItemModel) { directItemModel = (DirectItemModel) tag; @@ -203,9 +203,9 @@ public final class DirectMessageThread extends BaseLanguageActivity { for (final ProfileModel user : users) { if (Long.toString(userId).equals(user.getId())) result = user; } - if (leftusers != null) - for (final ProfileModel leftuser : leftusers) { - if (Long.toString(userId).equals(leftuser.getId())) result = leftuser; + if (leftUsers != null) + for (final ProfileModel leftUser : leftUsers) { + if (Long.toString(userId).equals(leftUser.getId())) result = leftUser; } return result; }