Hide reply answer if no answers

This commit is contained in:
M66B
2019-05-21 15:43:17 +02:00
parent 2b53398926
commit bc42de39ed
3 changed files with 18 additions and 0 deletions

View File

@@ -41,6 +41,10 @@ public interface DaoAnswer {
" ORDER BY name COLLATE NOCASE")
LiveData<List<EntityAnswer>> liveAnswers();
@Query("SELECT COUNT(*) FROM answer" +
" WHERE NOT hide")
LiveData<Integer> liveAnswerCount();
@Insert
long insertAnswer(EntityAnswer answer);