Fix issue #227
This commit is contained in:
parent
e095bcbb9e
commit
357c34d9f3
|
@ -37,6 +37,7 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
@ -79,6 +80,7 @@ public class ShowConversationActivity extends BaseActivity implements OnRetrieve
|
|||
private BroadcastReceiver receive_action;
|
||||
private String conversationId;
|
||||
private boolean spoilerShown, spoilerBehaviour;
|
||||
private LinearLayout loader;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -118,7 +120,8 @@ public class ShowConversationActivity extends BaseActivity implements OnRetrieve
|
|||
if (detailsStatus == null || detailsStatus.getId() == null)
|
||||
finish();
|
||||
|
||||
|
||||
loader = findViewById(R.id.loader);
|
||||
loader.setVisibility(View.VISIBLE);
|
||||
detailsStatus.setFocused(true);
|
||||
|
||||
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON) {
|
||||
|
@ -352,6 +355,7 @@ public class ShowConversationActivity extends BaseActivity implements OnRetrieve
|
|||
@Override
|
||||
public void onRetrieveContext(APIResponse apiResponse) {
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
loader.setVisibility(View.GONE);
|
||||
if (apiResponse.getError() != null) {
|
||||
if( apiResponse.getError().getError() != null) {
|
||||
Toasty.error(getApplicationContext(), apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||
|
|
|
@ -48,6 +48,26 @@
|
|||
android:scrollbars="none"
|
||||
android:divider="@null" />
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/loader">
|
||||
<ProgressBar
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:indeterminate="true"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/fetch_conversation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
|
|
@ -1235,4 +1235,5 @@
|
|||
<string name="long_api_error">The app received a very long error message from the API %1$s</string>
|
||||
<string name="message_preview">Message preview</string>
|
||||
<string name="report_mention">Add mentions in each message</string>
|
||||
<string name="fetch_conversation">Fetching conversation</string>
|
||||
</resources>
|
Loading…
Reference in New Issue