diff --git a/app/build.gradle b/app/build.gradle index 2d60f0a1d..1775f817d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "fr.gouv.etalab.mastodon" minSdkVersion 15 targetSdkVersion 25 - versionCode 17 - versionName "1.2.0" + versionCode 18 + versionName "1.2.1" } buildTypes { release { diff --git a/app/mastodon-etalab-v1.2.1.apk b/app/mastodon-etalab-v1.2.1.apk new file mode 100644 index 000000000..4a59cd5c1 Binary files /dev/null and b/app/mastodon-etalab-v1.2.1.apk differ diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayAccountsFragment.java b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayAccountsFragment.java index ce2c68c3e..0fb6cd509 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayAccountsFragment.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayAccountsFragment.java @@ -237,7 +237,7 @@ public class DisplayAccountsFragment extends Fragment implements OnRetrieveAccou final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true); if( show_error_messages) - Toast.makeText(getContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show(); + Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show(); return; } List accounts = apiResponse.getAccounts(); diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayFollowRequestSentFragment.java b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayFollowRequestSentFragment.java index 875965e0c..86df622d2 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayFollowRequestSentFragment.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayFollowRequestSentFragment.java @@ -157,7 +157,7 @@ public class DisplayFollowRequestSentFragment extends Fragment implements OnRetr final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true); if( show_error_messages) - Toast.makeText(getContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show(); + Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show(); return; } List accounts = apiResponse.getAccounts(); diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayNotificationsFragment.java b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayNotificationsFragment.java index ec0308fdb..d096d9039 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayNotificationsFragment.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayNotificationsFragment.java @@ -158,7 +158,7 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true); if( show_error_messages) - Toast.makeText(getContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show(); + Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show(); return; } List notifications = apiResponse.getNotifications(); @@ -179,7 +179,7 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve flag_loading = notifications != null && notifications.size() < notificationPerPage; //Store last notification id to avoid to notify for those that have been already seen if( notifications != null && notifications.size() > 0) { - final SharedPreferences sharedpreferences = getContext().getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); + final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); //acct is null as userId when used in Fragment, data need to be retrieved via shared preferences and db userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null); SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open(); diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayStatusFragment.java b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayStatusFragment.java index e3528a663..c1c22f027 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayStatusFragment.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/DisplayStatusFragment.java @@ -256,7 +256,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); boolean show_error_messages = sharedpreferences.getBoolean(Helper.SET_SHOW_ERROR_MESSAGES, true); if( show_error_messages) - Toast.makeText(getContext(), apiResponse.getError().getError(),Toast.LENGTH_LONG).show(); + Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show(); return; } List statuses = apiResponse.getStatuses(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 13f86cea2..ba226f4d6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -94,6 +94,7 @@ Supprimer ce pouet ? + null