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:
parent
9f6b63620e
commit
20387612db
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user