Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315686

Change subject: Make sure daily recurring tasks are executed when MainActivity 
is run.
......................................................................

Make sure daily recurring tasks are executed when MainActivity is run.

Right now our recurring tasks are triggered only when PageActivity is
started, which was acceptable in the previous incarnation of the app.
However, we now have MainActivity, with which the user can interact
without ever launching PageActivity, meaning that the recurring tasks
might not get executed.

This can actually mess with our engagement/retention metrics, since one of
the recurring tasks is DailyEventTask, which sends an event that we use to
measure retention.

This patch ensures that these tasks are executed when MainActivity is
started, in addition to PageActivity.

Change-Id: Ic9d41817740a65aac4ade0840efe784b32603b87
---
M app/src/main/java/org/wikipedia/main/MainFragment.java
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/86/315686/1

diff --git a/app/src/main/java/org/wikipedia/main/MainFragment.java 
b/app/src/main/java/org/wikipedia/main/MainFragment.java
index fe23388..90f314d 100644
--- a/app/src/main/java/org/wikipedia/main/MainFragment.java
+++ b/app/src/main/java/org/wikipedia/main/MainFragment.java
@@ -46,6 +46,7 @@
 import org.wikipedia.page.linkpreview.LinkPreviewDialog;
 import org.wikipedia.readinglist.AddToReadingListDialog;
 import org.wikipedia.readinglist.ReadingListsFragment;
+import org.wikipedia.recurring.RecurringTasksExecutor;
 import org.wikipedia.search.SearchFragment;
 import org.wikipedia.search.SearchInvokeSource;
 import org.wikipedia.search.SearchResultsFragment;
@@ -107,6 +108,10 @@
         if (savedInstanceState == null) {
             handleIntent(getActivity().getIntent());
         }
+
+        // Conditionally execute all recurring tasks
+        new RecurringTasksExecutor(WikipediaApp.getInstance()).run();
+
         return view;
     }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/315686
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9d41817740a65aac4ade0840efe784b32603b87
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <dbr...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to