From 9dd73d9d46c6ee1723631b67ded5412bff6a7cf0 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 25 May 2019 22:09:15 +0200 Subject: [PATCH] Simplify collapsible folders --- .../java/eu/faircode/email/AdapterFolder.java | 193 +++++++----------- .../java/eu/faircode/email/DaoFolder.java | 9 +- .../eu/faircode/email/FragmentFolders.java | 42 +--- .../java/eu/faircode/email/TupleFolderEx.java | 15 +- app/src/main/res/layout/item_folder.xml | 32 +-- 5 files changed, 92 insertions(+), 199 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterFolder.java b/app/src/main/java/eu/faircode/email/AdapterFolder.java index 39ba143466..f9fab42e2f 100644 --- a/app/src/main/java/eu/faircode/email/AdapterFolder.java +++ b/app/src/main/java/eu/faircode/email/AdapterFolder.java @@ -27,11 +27,8 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.ColorStateList; -import android.graphics.Canvas; import android.graphics.Color; -import android.graphics.Rect; import android.graphics.Typeface; -import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.provider.Settings; @@ -48,12 +45,9 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.appcompat.widget.PopupMenu; import androidx.lifecycle.LifecycleOwner; -import androidx.lifecycle.Observer; import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.preference.PreferenceManager; import androidx.recyclerview.widget.DiffUtil; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.ListUpdateCallback; import androidx.recyclerview.widget.RecyclerView; @@ -63,8 +57,10 @@ import java.text.Collator; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Locale; +import java.util.Map; public class AdapterFolder extends RecyclerView.Adapter { private Context context; @@ -73,11 +69,7 @@ public class AdapterFolder extends RecyclerView.Adapter