Fix crash + add gab.ai block
This commit is contained in:
parent
bd612583cc
commit
8b50ce0b2a
|
@ -273,7 +273,7 @@ public class LoginActivity extends BaseActivity {
|
|||
return;
|
||||
}
|
||||
instance = login_instance.getText().toString().trim().toLowerCase();
|
||||
if(instance.endsWith(".gab.com") || instance.equals("gab.com")){
|
||||
if(instance.endsWith(".gab.com") || instance.equals("gab.com") || instance.endsWith(".gab.ai") || instance.equals("gab.ai")){
|
||||
Toasty.error(LoginActivity.this,getString(R.string.client_error), Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -954,7 +954,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
ArrayList<Status> tmpStatuses = new ArrayList<>();
|
||||
for (Status tmpStatus : statuses) {
|
||||
//Put the toot at its place in the list (id desc)
|
||||
if( !apiResponse.isFetchmore() && !this.statuses.contains(tmpStatus) && tmpStatus.getCreated_at() != null && this.statuses.get(0).getCreated_at() != null && tmpStatus.getCreated_at().after(this.statuses.get(0).getCreated_at())) { //Element not already added
|
||||
if( !apiResponse.isFetchmore() && this.statuses.size() > 0 && !this.statuses.contains(tmpStatus) && tmpStatus.getCreated_at() != null && this.statuses.get(0).getCreated_at() != null && tmpStatus.getCreated_at().after(this.statuses.get(0).getCreated_at())) { //Element not already added
|
||||
//Mark status at new ones when their id is greater than the last read toot id
|
||||
if (type == RetrieveFeedsAsyncTask.Type.HOME && lastReadTootDate != null && tmpStatus.getCreated_at().after(lastReadTootDate) ) {
|
||||
tmpStatus.setNew(true);
|
||||
|
|
Loading…
Reference in New Issue