Updated to upstream Develop changes.
This commit is contained in:
parent
6bcec5d459
commit
a648a26894
|
@ -23,7 +23,6 @@ import android.os.Bundle;
|
|||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
@ -112,6 +111,7 @@ public class LoginActivity extends AppCompatActivity {
|
|||
RequestParams parameters = new RequestParams();
|
||||
parameters.add("q", s.toString().trim());
|
||||
parameters.add("count", String.valueOf(5));
|
||||
parameters.add("name", String.valueOf(true));
|
||||
new KinrarClient().get(action, parameters, new AsyncHttpResponseHandler() {
|
||||
@Override
|
||||
public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {
|
||||
|
|
|
@ -103,8 +103,8 @@ import fr.gouv.etalab.mastodon.interfaces.OnRetrieveAttachmentInterface;
|
|||
import fr.gouv.etalab.mastodon.interfaces.OnRetrieveSearcAccountshInterface;
|
||||
import fr.gouv.etalab.mastodon.jobs.ScheduledTootsSyncJob;
|
||||
import fr.gouv.etalab.mastodon.sqlite.AccountDAO;
|
||||
import fr.gouv.etalab.mastodon.sqlite.StatusStoredDAO;
|
||||
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
||||
import fr.gouv.etalab.mastodon.sqlite.StatusStoredDAO;
|
||||
import mastodon.etalab.gouv.fr.mastodon.R;
|
||||
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.HOME_TIMELINE_INTENT;
|
||||
|
@ -967,7 +967,19 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
|||
//Retrieves attachments
|
||||
restored = id;
|
||||
attachments = status.getMedia_attachments();
|
||||
toot_picture_container.removeAllViews();
|
||||
int childCount = toot_picture_container.getChildCount();
|
||||
ArrayList<ImageView> toRemove = new ArrayList<>();
|
||||
if( childCount > 0 ){
|
||||
for(int i = 0 ; i < childCount ; i++){
|
||||
if( toot_picture_container.getChildAt(i) instanceof ImageView)
|
||||
toRemove.add((ImageView) toot_picture_container.getChildAt(i));
|
||||
}
|
||||
if( toRemove.size() > 0){
|
||||
for(ImageView imageView: toRemove)
|
||||
toot_picture_container.removeView(imageView);
|
||||
}
|
||||
toRemove.clear();
|
||||
}
|
||||
loading_picture.setVisibility(View.GONE);
|
||||
if( attachments != null && attachments.size() > 0){
|
||||
toot_picture_container.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -87,7 +87,6 @@
|
|||
android:layout_weight="1"
|
||||
android:layout_height="0dp" />
|
||||
<LinearLayout
|
||||
android:id="@+id/bottom_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
|
Loading…
Reference in New Issue