diff options
author | Iván Ávalos <avalos@disroot.org> | 2023-01-08 23:56:30 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2023-01-08 23:56:30 -0600 |
commit | 036445a57b149dec82c72e48b98ae4b7b7c6c2b8 (patch) | |
tree | 19241cb051bf469860bd92a5d0b3374218007b80 /app/src/main/java/github/daneren2005/dsub/adapter/ExpandableSectionAdapter.java | |
parent | 42ac1065906364338ba09fb62006674f920e1165 (diff) | |
download | dsub-stupid-refactoring.tar.gz dsub-stupid-refactoring.tar.bz2 dsub-stupid-refactoring.zip |
Initial progress of huge refactoring job that I really, really shouldn't be doingstupid-refactoring
Diffstat (limited to 'app/src/main/java/github/daneren2005/dsub/adapter/ExpandableSectionAdapter.java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/adapter/ExpandableSectionAdapter.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/ExpandableSectionAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/ExpandableSectionAdapter.java index 6ebb34e3..6fc41b1c 100644 --- a/app/src/main/java/github/daneren2005/dsub/adapter/ExpandableSectionAdapter.java +++ b/app/src/main/java/github/daneren2005/dsub/adapter/ExpandableSectionAdapter.java @@ -16,13 +16,12 @@ package github.daneren2005.dsub.adapter; import android.content.Context; -import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import java.util.ArrayList; -import java.util.Arrays; +import java.util.Collections; import java.util.List; import github.daneren2005.dsub.R; @@ -31,7 +30,6 @@ import github.daneren2005.dsub.view.BasicHeaderView; import github.daneren2005.dsub.view.UpdateView; public abstract class ExpandableSectionAdapter<T> extends SectionAdapter<T> { - private static final String TAG = ExpandableSectionAdapter.class.getSimpleName(); private static final int DEFAULT_VISIBLE = 4; private static final int EXPAND_TOGGLE = R.attr.select_server; private static final int COLLAPSE_TOGGLE = R.attr.select_tabs; @@ -46,10 +44,7 @@ public abstract class ExpandableSectionAdapter<T> extends SectionAdapter<T> { List<List<T>> sections = new ArrayList<>(); sections.add(section); - init(context, Arrays.asList("Section"), sections, Arrays.asList((Integer) null)); - } - public ExpandableSectionAdapter(Context context, List<String> headers, List<List<T>> sections) { - init(context, headers, sections, null); + init(context, Collections.singletonList("Section"), sections, Collections.singletonList((Integer) null)); } public ExpandableSectionAdapter(Context context, List<String> headers, List<List<T>> sections, List<Integer> sectionsDefaultVisible) { init(context, headers, sections, sectionsDefaultVisible); @@ -143,8 +138,6 @@ public abstract class ExpandableSectionAdapter<T> extends SectionAdapter<T> { toggleSelectionView.setVisibility(View.GONE); } - if(view != null) { - view.setObject(header); - } + view.setObject(header); } } |