mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 01:06:11 +00:00
Debug: more logging
This commit is contained in:
parent
a06e4aa0a3
commit
5a65365f2c
2 changed files with 4 additions and 3 deletions
|
@ -32,8 +32,8 @@ public interface DaoLog {
|
||||||
" WHERE time > :from" +
|
" WHERE time > :from" +
|
||||||
" AND (:type IS NULL OR type = :type)" +
|
" AND (:type IS NULL OR type = :type)" +
|
||||||
" ORDER BY time DESC" +
|
" ORDER BY time DESC" +
|
||||||
" LIMIT 2000")
|
" LIMIT :limit")
|
||||||
LiveData<List<EntityLog>> liveLogs(long from, Integer type);
|
LiveData<List<EntityLog>> liveLogs(long from, int limit, Integer type);
|
||||||
|
|
||||||
@Query("SELECT * FROM log" +
|
@Query("SELECT * FROM log" +
|
||||||
" WHERE time > :from" +
|
" WHERE time > :from" +
|
||||||
|
|
|
@ -128,9 +128,10 @@ public class FragmentLogs extends FragmentBase {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
|
||||||
long from = new Date().getTime() - 24 * 3600 * 1000L;
|
long from = new Date().getTime() - 24 * 3600 * 1000L;
|
||||||
|
int limit = (BuildConfig.DEBUG ? 10000 : 2000);
|
||||||
|
|
||||||
DB db = DB.getInstance(getContext());
|
DB db = DB.getInstance(getContext());
|
||||||
db.log().liveLogs(from, null).observe(getViewLifecycleOwner(), new Observer<List<EntityLog>>() {
|
db.log().liveLogs(from, limit, null).observe(getViewLifecycleOwner(), new Observer<List<EntityLog>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(List<EntityLog> logs) {
|
public void onChanged(List<EntityLog> logs) {
|
||||||
if (logs == null)
|
if (logs == null)
|
||||||
|
|
Loading…
Reference in a new issue