Improves tab layout + fixes an issue with two local/public timelines

This commit is contained in:
tom79 2017-08-24 18:55:44 +02:00
parent c3bd364543
commit 166b472727
2 changed files with 7 additions and 3 deletions

View File

@ -254,12 +254,12 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
flag_loading = false;
return;
}
List<Status> statuses = apiResponse.getStatuses();
if( type == RetrieveFeedsAsyncTask.Type.HOME){
SharedPreferences.Editor editor = sharedpreferences.edit();
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
editor.putString(Helper.LAST_BUBBLE_REFRESH+ userId,Helper.dateToString(context, new Date()));
editor.apply();
List<Status> statuses = apiResponse.getStatuses();
String old_max_id = sharedpreferences.getString(Helper.LAST_HOMETIMELINE_MAX_ID + userId, null);
if( refreshData || !displayStatusFragment.getUserVisibleHint()) {
max_id = apiResponse.getMax_id();

View File

@ -25,13 +25,17 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:id="@+id/tab_counter"
android:visibility="gone"
android:gravity="center"
android:textSize="10sp"
android:minWidth="20dp"
android:minHeight="20dp"
android:textColor="@color/mastodonC1"
android:background="@drawable/shape_counter"
android:layout_gravity="center"
android:layout_width="18dp"
android:layout_height="18dp"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>