diff options
author | Andrew Dolgov <[email protected]> | 2018-03-08 17:09:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-03-08 17:09:35 +0300 |
commit | 3fe89ce427b6f44e37ccc85dfc985cce7eccfe20 (patch) | |
tree | abc53c9685f4bbb599749441896dd1ba36e260f4 /org.fox.ttrss/src/main/java/org/fox | |
parent | 05ff147fe669ca41600e3419519118d7621feff0 (diff) |
rate limit fragment refreshing on drawer open
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java index cb332e95..a7eb8fb2 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java @@ -81,7 +81,11 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList getSupportActionBar().show(); invalidateOptionsMenu(); - refresh(false); + Date date = new Date(); + if (date.getTime() - m_lastRefresh > 60*1000) { + m_lastRefresh = date.getTime(); + refresh(false); + } } @Override @@ -263,7 +267,7 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList Date date = new Date(); - if (date.getTime() - m_lastRefresh > 10000) { + if (date.getTime() - m_lastRefresh > 30*1000) { m_lastRefresh = date.getTime(); refresh(false); } |