Skip to content

Commit 3912715

Browse files
committed
Hide note text if it is blank
1 parent b4314e8 commit 3912715

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/OpenNoteAdapter.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import com.google.gson.Gson
1111
import com.google.gson.reflect.TypeToken
1212
import com.simplemobiletools.commons.activities.BaseSimpleActivity
1313
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
14-
import com.simplemobiletools.commons.extensions.beGone
15-
import com.simplemobiletools.commons.extensions.beVisible
16-
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
17-
import com.simplemobiletools.commons.extensions.isBlackAndWhiteTheme
14+
import com.simplemobiletools.commons.extensions.*
1815
import com.simplemobiletools.commons.helpers.LOWER_ALPHA_INT
1916
import com.simplemobiletools.commons.helpers.SORT_BY_CUSTOM
2017
import com.simplemobiletools.commons.views.MyRecyclerView
@@ -82,9 +79,10 @@ class OpenNoteAdapter(
8279
text = note.title
8380
setTextColor(properPrimaryColor)
8481
}
85-
open_note_item_text.beVisible()
82+
val formattedText = note.getFormattedValue(context)
83+
open_note_item_text.beGoneIf(formattedText.isNullOrBlank())
8684
open_note_item_text.apply {
87-
text = note.getFormattedValue(context)
85+
text = formattedText
8886
setTextColor(textColor)
8987
}
9088
}

0 commit comments

Comments
 (0)