mirror of
https://github.com/mastodon/mastodon-android.git
synced 2024-12-22 14:44:21 +01:00
Show the direction on gaps + bug fix
This commit is contained in:
parent
134bd13d60
commit
ea1216b352
@ -13,7 +13,7 @@ android {
|
||||
applicationId "org.joinmastodon.android"
|
||||
minSdk 23
|
||||
targetSdk 34
|
||||
versionCode 127
|
||||
versionCode 128
|
||||
versionName "2.9.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -308,8 +308,9 @@ public class HomeTimelineFragment extends StatusListFragment implements ToolbarD
|
||||
if(!gap.visible){
|
||||
gap.visible=true;
|
||||
gap.enteredFromTop=child.getTop()<list.getHeight()/2;
|
||||
gaps.remove(gap);
|
||||
holder.text.setText(gap.enteredFromTop ? R.string.load_missing_posts_above : R.string.load_missing_posts_below);
|
||||
}
|
||||
gaps.remove(gap);
|
||||
}
|
||||
}
|
||||
for(GapStatusDisplayItem gap:gaps){
|
||||
|
@ -40,6 +40,7 @@ public class GapStatusDisplayItem extends StatusDisplayItem{
|
||||
public void onBind(GapStatusDisplayItem item){
|
||||
text.setVisibility(item.loading ? View.GONE : View.VISIBLE);
|
||||
progress.setVisibility(item.loading ? View.VISIBLE : View.GONE);
|
||||
text.setText(item.enteredFromTop ? R.string.load_missing_posts_above : R.string.load_missing_posts_below);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:background="@drawable/bg_timeline_gap">
|
||||
@ -9,10 +10,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:text="@string/load_missing_posts"/>
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
tools:text="@string/load_missing_posts_above"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
|
@ -240,7 +240,6 @@
|
||||
<string name="local_timeline_info_banner">These are all the posts from all users in your server (%s).</string>
|
||||
<string name="recommended_accounts_info_banner">You might like these accounts based on others you follow.</string>
|
||||
<string name="see_new_posts">New posts</string>
|
||||
<string name="load_missing_posts">Load missing posts</string>
|
||||
<string name="follow_back">Follow back</string>
|
||||
<string name="button_follow_pending">Pending</string>
|
||||
<string name="follows_you">Follows you</string>
|
||||
@ -856,4 +855,6 @@
|
||||
</plurals>
|
||||
<!-- The complete string will look like "You will lose X people you follow". See will_lose_x_following -->
|
||||
<string name="server_x_following_will_be_removed">You will lose %s.</string>
|
||||
<string name="load_missing_posts_above">Load missing posts above</string>
|
||||
<string name="load_missing_posts_below">Load missing posts below</string>
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user