Merged original_master into PhotonQyv-Baseline
This commit is contained in:
commit
a14763e60c
|
@ -7,8 +7,8 @@ android {
|
||||||
applicationId "fr.gouv.etalab.mastodon"
|
applicationId "fr.gouv.etalab.mastodon"
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 62
|
versionCode 63
|
||||||
versionName "1.5.2"
|
versionName "1.5.3"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
|
@ -1214,6 +1214,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
toot_content.setAdapter(accountsListAdapter);
|
toot_content.setAdapter(accountsListAdapter);
|
||||||
final String oldContent = toot_content.getText().toString();
|
final String oldContent = toot_content.getText().toString();
|
||||||
String[] searchA = oldContent.substring(0,currentCursorPosition).split("@");
|
String[] searchA = oldContent.substring(0,currentCursorPosition).split("@");
|
||||||
|
if( searchA.length > 0 ) {
|
||||||
final String search = searchA[searchA.length - 1];
|
final String search = searchA[searchA.length - 1];
|
||||||
toot_content.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
toot_content.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1245,6 +1246,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveSearch(Results results, Error error) {
|
public void onRetrieveSearch(Results results, Error error) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class RetrieveSearchAccountsAsyncTask extends AsyncTask<Void, Void, Void>
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground(Void... params) {
|
protected Void doInBackground(Void... params) {
|
||||||
API api = new API(context);
|
API api = new API(context);
|
||||||
apiResponse = api.searchAccounts(query, 10);
|
apiResponse = api.searchAccounts(query, 20);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class AccountsSearchAdapter extends ArrayAdapter<Account> implements Filt
|
||||||
holder.account_un.setText(String.format("@%s", account.getUsername() + "@" + instance));
|
holder.account_un.setText(String.format("@%s", account.getUsername() + "@" + instance));
|
||||||
holder.account_dn.setVisibility(View.GONE);
|
holder.account_dn.setVisibility(View.GONE);
|
||||||
}else {
|
}else {
|
||||||
holder.account_un.setText(String.format("@%s", account.getUsername()));
|
holder.account_un.setText(String.format("@%s", account.getAcct()));
|
||||||
holder.account_dn.setText(Helper.shortnameToUnicode(account.getDisplay_name(), true));
|
holder.account_dn.setText(Helper.shortnameToUnicode(account.getDisplay_name(), true));
|
||||||
holder.account_dn.setVisibility(View.VISIBLE);
|
holder.account_dn.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,6 +385,11 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
||||||
retrieveMissingToots(statuses.get(0).getId());
|
retrieveMissingToots(statuses.get(0).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int index = lv_status.getFirstVisiblePosition();
|
||||||
|
View v = lv_status.getChildAt(0);
|
||||||
|
int top = (v == null) ? 0 : v.getTop();
|
||||||
|
statusListAdapter.notifyDataSetChanged();
|
||||||
|
lv_status.setSelectionFromTop(index, top);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue