Added missing logic for posts retrieval

blinds
Laurent 5 years ago
parent f1ee656e52
commit b05ba6f61d
  1. 2
      app/src/main/java/net/pokeranalytics/android/ui/modules/feed/FeedFragment.kt
  2. 1
      app/src/main/java/net/pokeranalytics/android/util/Preferences.kt

@ -584,7 +584,7 @@ class FeedFragment : FilterableFragment(), RowRepresentableDelegate, PurchaseLis
val now = Date().time
// if (true) {
if (Preferences.getLastBlogTipsRetrievalDate(requireContext()) + 24 * 3600 * 1000 < now) {
if (Preferences.shouldShowBlogTips(requireContext()) && Preferences.getLastBlogTipsRetrievalDate(requireContext()) + 24 * 3600 * 1000 < now) {
BlogPostApi.getLatestPosts(requireContext()) { posts ->
Preferences.setLastBlogTipsRetrievalDate(now, requireContext())

@ -258,6 +258,7 @@ class Preferences {
}
fun showBlogTips(show: Boolean, context: Context) {
setLastBlogTipsRetrievalDate(0L, context)
setBoolean(Keys.SHOW_BLOG_TIPS, show, context)
}

Loading…
Cancel
Save