From 5bbb1b081a669cdc04c670153fc34e6a5089739b Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 30 Jul 2019 11:31:32 +0200 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/Widget.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Widget.java b/app/src/main/java/eu/faircode/email/Widget.java index a36380730f..4614e58ee2 100644 --- a/app/src/main/java/eu/faircode/email/Widget.java +++ b/app/src/main/java/eu/faircode/email/Widget.java @@ -41,7 +41,7 @@ public class Widget extends AppWidgetProvider { @Override public void run() { DB db = DB.getInstance(context); - update(appWidgetIds, appWidgetManager, context, db.message().getUnseenUnified()); + update(context, appWidgetManager, appWidgetIds, db.message().getUnseenUnified()); } }); } @@ -49,10 +49,10 @@ public class Widget extends AppWidgetProvider { static void update(Context context, int count) { AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); int[] appWidgetIds = AppWidgetManager.getInstance(context).getAppWidgetIds(new ComponentName(context, Widget.class)); - update(appWidgetIds, appWidgetManager, context, count); + update(context, appWidgetManager, appWidgetIds, count); } - private static void update(int[] appWidgetIds, AppWidgetManager appWidgetManager, Context context, int count) { + private static void update(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds, int count) { Intent view = new Intent(context, ActivityView.class); view.setAction("unified"); view.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);