From 8d9946a5d50ad39a671c977a6e5b72aa01b7edaf Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 1 Mar 2020 10:14:27 +0100 Subject: [PATCH] Some fixes --- .../main/java/app/fedilab/nitterizeme/AppInfoAdapter.java | 2 +- app/src/main/java/app/fedilab/nitterizeme/Instance.java | 2 +- .../java/app/fedilab/nitterizeme/InstanceAdapter.java | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/app/fedilab/nitterizeme/AppInfoAdapter.java b/app/src/main/java/app/fedilab/nitterizeme/AppInfoAdapter.java index 4495b6e..62ac648 100644 --- a/app/src/main/java/app/fedilab/nitterizeme/AppInfoAdapter.java +++ b/app/src/main/java/app/fedilab/nitterizeme/AppInfoAdapter.java @@ -104,7 +104,7 @@ public class AppInfoAdapter extends RecyclerView.Adapter { } - class ViewHolder extends RecyclerView.ViewHolder { + static class ViewHolder extends RecyclerView.ViewHolder { ImageView app_icon, valid; TextView information, domain; LinearLayout main_container; diff --git a/app/src/main/java/app/fedilab/nitterizeme/Instance.java b/app/src/main/java/app/fedilab/nitterizeme/Instance.java index 16806aa..a743848 100644 --- a/app/src/main/java/app/fedilab/nitterizeme/Instance.java +++ b/app/src/main/java/app/fedilab/nitterizeme/Instance.java @@ -20,7 +20,7 @@ class Instance { private long latency = -1; private boolean checked = false; private instanceType type; - private boolean cloudflare =false; + private boolean cloudflare = false; private String locale; String getDomain() { diff --git a/app/src/main/java/app/fedilab/nitterizeme/InstanceAdapter.java b/app/src/main/java/app/fedilab/nitterizeme/InstanceAdapter.java index a3f3170..83c719e 100644 --- a/app/src/main/java/app/fedilab/nitterizeme/InstanceAdapter.java +++ b/app/src/main/java/app/fedilab/nitterizeme/InstanceAdapter.java @@ -91,10 +91,10 @@ public class InstanceAdapter extends RecyclerView.Adapter { } holder.locale.setText(instance.getLocale()); - if( instance.isCloudflare()){ + if (instance.isCloudflare()) { holder.useCloudflare.setVisibility(View.VISIBLE); - holder.useCloudflare.setOnClickListener(v -> Toast.makeText(context,R.string.cloudflare,Toast.LENGTH_SHORT).show()); - }else{ + holder.useCloudflare.setOnClickListener(v -> Toast.makeText(context, R.string.cloudflare, Toast.LENGTH_SHORT).show()); + } else { holder.useCloudflare.setVisibility(View.GONE); } @@ -171,7 +171,7 @@ public class InstanceAdapter extends RecyclerView.Adapter { } - class ViewHolder extends RecyclerView.ViewHolder { + static class ViewHolder extends RecyclerView.ViewHolder { RadioButton checkbox_instance; TextView latency, locale; ProgressBar progress;