mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #3744 from deltachat/adb/fix-some-linter-warnings-22/4/25
fix some linter warnings
This commit is contained in:
@@ -269,11 +269,10 @@ public class ConversationItem extends BaseConversationItem
|
||||
R.attr.conversation_item_incoming_bubble_color,
|
||||
R.attr.conversation_item_outgoing_bubble_color,
|
||||
};
|
||||
final TypedArray attrs = context.obtainStyledAttributes(attributes);
|
||||
|
||||
incomingBubbleColor = attrs.getColor(0, Color.WHITE);
|
||||
outgoingBubbleColor = attrs.getColor(1, Color.WHITE);
|
||||
attrs.recycle();
|
||||
try (TypedArray attrs = context.obtainStyledAttributes(attributes)) {
|
||||
incomingBubbleColor = attrs.getColor(0, Color.WHITE);
|
||||
outgoingBubbleColor = attrs.getColor(1, Color.WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -900,7 +899,7 @@ public class ConversationItem extends BaseConversationItem
|
||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
|
||||
try {
|
||||
List<Integer> contactIds = rpc.importVcard(dcContext.getAccountId(), path);
|
||||
if (contactIds.size() > 0) {
|
||||
if (!contactIds.isEmpty()) {
|
||||
int chatId = dcContext.createChatByContactId(contactIds.get(0));
|
||||
if (chatId != 0) {
|
||||
Intent intent = new Intent(context, ConversationActivity.class);
|
||||
|
||||
@@ -47,7 +47,6 @@ public class SearchFragment extends BaseConversationListFragment
|
||||
public static final String TAG = "SearchFragment";
|
||||
|
||||
private TextView noResultsView;
|
||||
private RecyclerView listView;
|
||||
private StickyHeaderDecoration listDecoration;
|
||||
|
||||
private SearchViewModel viewModel;
|
||||
@@ -93,7 +92,7 @@ public class SearchFragment extends BaseConversationListFragment
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
noResultsView = view.findViewById(R.id.search_no_results);
|
||||
listView = view.findViewById(R.id.search_list);
|
||||
RecyclerView listView = view.findViewById(R.id.search_list);
|
||||
fab = view.findViewById(R.id.fab);
|
||||
|
||||
listAdapter = new SearchListAdapter(getContext(), GlideApp.with(this), this);
|
||||
|
||||
Reference in New Issue
Block a user