Journal entry list: mark malformed entries with a bug icon.

This is an indication that an entry failed to parse.
pull/108/head
Tom Hacohen 4 years ago
parent 9f6b63620e
commit 20387612db

@ -104,6 +104,12 @@ class ListEntriesFragment : ListFragment(), AdapterView.OnItemClickListener {
val info = journalEntity!!.info
setJournalEntryView(v, info, entryEntity!!.content)
val entryError = data.select(EntryErrorEntity::class.java).where(EntryErrorEntity.ENTRY.eq(entryEntity)).limit(1).get().firstOrNull()
if (entryError != null) {
val errorIcon = v.findViewById<View>(R.id.error) as ImageView
errorIcon.visibility = View.VISIBLE
}
return v
}
}

@ -31,4 +31,11 @@
tools:text="Subtitle"/>
</LinearLayout>
<ImageView
android:id="@+id/error"
android:src="@drawable/ic_bug_report"
android:layout_width="32dp"
android:layout_height="32dp"
android:visibility="gone" />
</LinearLayout>
Loading…
Cancel
Save