From 04f887bc3a3ba72993340457fd983dedca097e35 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Tue, 26 Dec 2023 10:20:25 +0100 Subject: [PATCH] Added file indicator to exported notes --- .../org/fossify/notes/adapters/OpenNoteAdapter.kt | 9 +++++++++ app/src/main/res/layout/open_note_item.xml | 12 ++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/notes/adapters/OpenNoteAdapter.kt b/app/src/main/kotlin/org/fossify/notes/adapters/OpenNoteAdapter.kt index 8e166ba0..cd11b712 100644 --- a/app/src/main/kotlin/org/fossify/notes/adapters/OpenNoteAdapter.kt +++ b/app/src/main/kotlin/org/fossify/notes/adapters/OpenNoteAdapter.kt @@ -15,6 +15,8 @@ import org.fossify.commons.extensions.beGoneIf import org.fossify.commons.extensions.beVisibleIf import org.fossify.commons.extensions.getColoredDrawableWithColor import org.fossify.commons.extensions.isBlackAndWhiteTheme +import org.fossify.commons.extensions.applyColorFilter +import org.fossify.commons.extensions.toast import org.fossify.commons.helpers.LOWER_ALPHA_INT import org.fossify.commons.helpers.SORT_BY_CUSTOM import org.fossify.commons.views.MyRecyclerView @@ -75,6 +77,13 @@ class OpenNoteAdapter( text = formattedText setTextColor(textColor) } + openNoteItemIcon.apply { + beVisibleIf(note.path.isNotEmpty()) + applyColorFilter(textColor) + setOnClickListener { + activity.toast(note.path) + } + } } } diff --git a/app/src/main/res/layout/open_note_item.xml b/app/src/main/res/layout/open_note_item.xml index e8d18e9b..4afddc90 100644 --- a/app/src/main/res/layout/open_note_item.xml +++ b/app/src/main/res/layout/open_note_item.xml @@ -19,12 +19,20 @@ android:src="@drawable/ic_lock_vector" android:visibility="gone" /> - + +