Merge remote-tracking branch 'remotes/tom-repo/develop' into PinningToots

This commit is contained in:
PhotonQyv 2017-09-12 16:33:38 +01:00
commit d0e9fce6ee
2 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@
<activity <activity
android:name="fr.gouv.etalab.mastodon.activities.MainActivity" android:name="fr.gouv.etalab.mastodon.activities.MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleTask" android:launchMode="singleTop"
android:windowSoftInputMode = "adjustResize" android:windowSoftInputMode = "adjustResize"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeDark_NoActionBar"> android:theme="@style/AppThemeDark_NoActionBar">

View File

@ -23,7 +23,6 @@ import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
@ -58,8 +57,9 @@ public class AboutActivity extends AppCompatActivity implements OnRetrieveRemote
private List<Account> contributors = new ArrayList<>(); private List<Account> contributors = new ArrayList<>();
private AccountSearchDevAdapter accountSearchWebAdapterDeveloper; private AccountSearchDevAdapter accountSearchWebAdapterDeveloper;
private AccountSearchDevAdapter accountSearchWebAdapterContributors; private AccountSearchDevAdapter accountSearchWebAdapterContributors;
@SuppressWarnings("FieldCanBeLocal")
private int DEV_COUNT = 1, CONTRIBUTOR_COUNT = 2;
@SuppressWarnings("deprecation")
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -226,12 +226,12 @@ public class AboutActivity extends AppCompatActivity implements OnRetrieveRemote
@Override @Override
public void onResume(){ public void onResume(){
super.onResume(); super.onResume();
if( developers != null && developers.size() > 0){ if( developers != null && developers.size() == DEV_COUNT){
for(Account account: developers){ for(Account account: developers){
new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(),AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(),AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} }
} }
if( contributors != null && contributors.size() > 0){ if( contributors != null && contributors.size() == CONTRIBUTOR_COUNT){
for(Account account: contributors){ for(Account account: contributors){
new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(),AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new RetrieveRelationshipAsyncTask(getApplicationContext(), account.getId(),AboutActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} }