Fix issue #535
This commit is contained in:
parent
c4c6f7995f
commit
fa9723bc99
|
@ -947,6 +947,9 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
}
|
||||
}
|
||||
this.statuses.addAll(position, tmpStatuses);
|
||||
boolean display_content_after_fetch_more = sharedpreferences.getBoolean(Helper.SET_DISPLAY_CONTENT_AFTER_FM, true);
|
||||
if( position > 0 && display_content_after_fetch_more)
|
||||
lv_status.scrollToPosition(position + tmpStatuses.size());
|
||||
statusListAdapter.notifyItemRangeInserted(position, tmpStatuses.size());
|
||||
if( textviewNoAction.getVisibility() == View.VISIBLE && tmpStatuses.size() > 0){
|
||||
textviewNoAction.setVisibility(View.GONE);
|
||||
|
|
|
@ -100,6 +100,19 @@ public class SettingsFragment extends Fragment {
|
|||
editor.apply();
|
||||
}
|
||||
});
|
||||
|
||||
boolean display_content_after_fetch_more = sharedpreferences.getBoolean(Helper.SET_DISPLAY_CONTENT_AFTER_FM, true);
|
||||
final CheckBox set_display_content_after_fetch_more = rootView.findViewById(R.id.set_display_content_after_fetch_more);
|
||||
set_display_content_after_fetch_more.setChecked(display_content_after_fetch_more);
|
||||
set_display_content_after_fetch_more.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||
editor.putBoolean(Helper.SET_DISPLAY_CONTENT_AFTER_FM, set_display_content_after_fetch_more.isChecked());
|
||||
editor.apply();
|
||||
}
|
||||
});
|
||||
|
||||
count1 = 0;
|
||||
count2 = 0;
|
||||
count3 = 0;
|
||||
|
|
|
@ -295,6 +295,7 @@ public class Helper {
|
|||
public static final String SET_BATTERY_PROFILE = "set_battery_profile";
|
||||
public static final String SET_DEFAULT_LOCALE_NEW = "set_default_locale_new";
|
||||
public static final String SET_NOTIFICATION_ACTION = "set_notification_action";
|
||||
public static final String SET_DISPLAY_CONTENT_AFTER_FM = "set_display_content_after_fm";
|
||||
public static final int S_512KO = 1;
|
||||
public static final int S_1MO = 2;
|
||||
public static final int S_2MO = 3;
|
||||
|
|
|
@ -192,6 +192,12 @@
|
|||
android:text="@string/set_old_direct_timeline"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/set_display_content_after_fetch_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/set_display_content_after_fetch_more"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- TRUNCATE LONG TOOTS -->
|
||||
<TextView
|
||||
android:layout_marginTop="10dp"
|
||||
|
|
|
@ -195,6 +195,12 @@
|
|||
android:text="@string/set_old_direct_timeline"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/set_display_content_after_fetch_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/set_display_content_after_fetch_more"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- TRUNCATE LONG TOOTS -->
|
||||
<TextView
|
||||
android:layout_marginTop="10dp"
|
||||
|
|
|
@ -834,6 +834,7 @@
|
|||
<string name="toots_server">Toots (Server)</string>
|
||||
<string name="toots_client">Toots (Device)</string>
|
||||
<string name="modify">Modify</string>
|
||||
<string name="set_display_content_after_fetch_more">Display new toots above the \"Fetch more\" button</string>
|
||||
<!-- end languages -->
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue