Refactoring

This commit is contained in:
M66B 2020-04-08 12:24:51 +02:00
parent b1d516f61b
commit 96e99e4a13
2 changed files with 2 additions and 2 deletions

View File

@ -53,8 +53,8 @@ public class Widget extends AppWidgetProvider {
NumberFormat nf = NumberFormat.getIntegerInstance();
for (int appWidgetId : appWidgetIds) {
long account = prefs.getLong("widget." + appWidgetId + ".account", -1L);
String name = prefs.getString("widget." + appWidgetId + ".name", null);
long account = prefs.getLong("widget." + appWidgetId + ".account", -1L);
boolean semi = prefs.getBoolean("widget." + appWidgetId + ".semi", true);
List<EntityFolder> folders = db.folder().getNotifyingFolders(account);

View File

@ -38,6 +38,7 @@ public class WidgetUnified extends AppWidgetProvider {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
for (int appWidgetId : appWidgetIds) {
String name = prefs.getString("widget." + appWidgetId + ".name", null);
long account = prefs.getLong("widget." + appWidgetId + ".account", -1L);
long folder = prefs.getLong("widget." + appWidgetId + ".folder", -1L);
String type = prefs.getString("widget." + appWidgetId + ".type", null);
@ -56,7 +57,6 @@ public class WidgetUnified extends AppWidgetProvider {
if (!semi)
views.setInt(R.id.widget, "setBackgroundColor", Color.TRANSPARENT);
String name = prefs.getString("widget." + appWidgetId + ".name", null);
if (name == null)
views.setTextViewText(R.id.title, context.getString(R.string.title_folder_unified));
else