From d76fcd0f7a6a0c38bb49838d048dde987d06089d Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 20 Nov 2022 10:20:52 +0100 Subject: [PATCH] Fix issue #485 - Add a delete icon on items + rename menu item --- .../android/ui/drawer/ReorderTabAdapter.java | 15 ++++++++++++++- app/src/main/res/layout/drawer_reorder.xml | 12 ++++++++++++ app/src/main/res/values/strings.xml | 3 ++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java index e8498f66..4f073910 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ReorderTabAdapter.java @@ -19,6 +19,7 @@ import android.annotation.SuppressLint; import android.content.Context; import android.view.LayoutInflater; import android.view.MotionEvent; +import android.view.View; import android.view.ViewGroup; import android.widget.Toast; @@ -160,7 +161,19 @@ public class ReorderTabAdapter extends RecyclerView.Adapter { + if (item.type == Timeline.TimeLineEnum.TAG || item.type == Timeline.TimeLineEnum.REMOTE || item.type == Timeline.TimeLineEnum.LIST) { + mUndoListener.onUndo(item, position); + pinned.pinnedTimelines.remove(position); + notifyItemRemoved(position); + } + }); } @Override diff --git a/app/src/main/res/layout/drawer_reorder.xml b/app/src/main/res/layout/drawer_reorder.xml index 5603ca41..bd8002a4 100644 --- a/app/src/main/res/layout/drawer_reorder.xml +++ b/app/src/main/res/layout/drawer_reorder.xml @@ -29,6 +29,7 @@ android:layout_gravity="center_vertical" android:layout_weight="1" /> + + + Categories Move timeline Hide timeline - Reorder timelines + Manage timelines List permanently deleted Followed instance removed Pinned tag removed @@ -1901,4 +1901,5 @@ The app failed to add the account into the list! Display remote profile The app cannot find remote data! + Delete timeline \ No newline at end of file