Fixes bug with notifications when scrolling down + prepares release 1.2.7

This commit is contained in:
tom79 2017-07-01 16:43:53 +02:00
parent 5519242cd0
commit d95a291935
6 changed files with 7 additions and 7 deletions

View File

@ -7,8 +7,8 @@ android {
applicationId "fr.gouv.etalab.mastodon"
minSdkVersion 15
targetSdkVersion 25
versionCode 23
versionName "1.2.6"
versionCode 24
versionName "1.2.7"
}
buildTypes {
release {

Binary file not shown.

Binary file not shown.

View File

@ -100,7 +100,7 @@ public class API {
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
tootPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
accountPerPage = sharedpreferences.getInt(Helper.SET_ACCOUNTS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
this.instance = Helper.getLiveInstance(context);
this.prefKeyOauthTokenT = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
apiResponse = new APIResponse();
@ -112,7 +112,7 @@ public class API {
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
tootPerPage = sharedpreferences.getInt(Helper.SET_TOOTS_PER_PAGE, 40);
accountPerPage = sharedpreferences.getInt(Helper.SET_ACCOUNTS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
if( instance != null)
this.instance = instance;
else

View File

@ -78,7 +78,7 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipeContainer);
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
notificationPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
lv_notifications = (ListView) rootView.findViewById(R.id.lv_notifications);
mainLoader = (RelativeLayout) rootView.findViewById(R.id.loader);

View File

@ -94,8 +94,8 @@ public class SettingsOptimizationFragment extends Fragment {
//Notifications per page
SeekBar notificationsSeekBar = (SeekBar) rootView.findViewById(R.id.set_notifications_per_page);
final TextView set_notifications_page_value = (TextView) rootView.findViewById(R.id.set_notifications_page_value);
notificationsSeekBar.setMax(30);
int notificationsPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 40);
notificationsSeekBar.setMax(20);
int notificationsPerPage = sharedpreferences.getInt(Helper.SET_NOTIFICATIONS_PER_PAGE, 15);
notificationsSeekBar.setProgress(notificationsPerPage-10);
set_notifications_page_value.setText(String.valueOf(notificationsPerPage));
notificationsSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {