1
0
mirror of https://github.com/etesync/android synced 2024-11-22 16:08:13 +00:00

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

This is an indication that an entry failed to parse.
This commit is contained in:
Tom Hacohen 2020-02-28 13:00:48 +02:00
parent 9f6b63620e
commit 20387612db
2 changed files with 13 additions and 0 deletions

View File

@ -104,6 +104,12 @@ class ListEntriesFragment : ListFragment(), AdapterView.OnItemClickListener {
val info = journalEntity!!.info val info = journalEntity!!.info
setJournalEntryView(v, info, entryEntity!!.content) 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 return v
} }
} }

View File

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