Fixes crashes
This commit is contained in:
parent
23cc595306
commit
956db2214c
|
@ -1,7 +1,4 @@
|
|||
**Mastalab** est une application Android dédiée à l'instance [mastodon.etalab.gouv.fr](https://mastodon.etalab.gouv.fr)
|
||||
|
||||
Pour l'utiliser vous devez posséder un compte sur cette instance. Si ce n'est pas le cas, vous pouvez [vous inscrire](https://mastodon.etalab.gouv.fr/auth/sign_up).
|
||||
Cependant vous devez avoir une adresse email qui soit listée sur [cette page](https://forum.etalab.gouv.fr/t/mastodon-le-reseau-social-libre-et-decentralise-en-plein-decollage/3538).
|
||||
**Mastalab** est une application Android multi-comptes pour Mastodon
|
||||
|
||||
|
||||
Pour toute remarque ou demande d'évolution, vous pouvez me contacter sur cette instance : [@tschneider](https://mastodon.etalab.gouv.fr/@tschneider)
|
||||
|
|
|
@ -134,12 +134,12 @@ public class NotificationsListAdapter extends BaseAdapter {
|
|||
|
||||
final Status status = notification.getStatus();
|
||||
if( status != null ){
|
||||
if( status.getMedia_attachments().size() < 1)
|
||||
if( status.getMedia_attachments() == null || status.getMedia_attachments().size() < 1)
|
||||
holder.status_document_container.setVisibility(View.GONE);
|
||||
else
|
||||
holder.status_document_container.setVisibility(View.VISIBLE);
|
||||
|
||||
if( !status.getIn_reply_to_account_id().equals("null") || !status.getIn_reply_to_id().equals("null") ){
|
||||
if( (status.getIn_reply_to_account_id() != null && !status.getIn_reply_to_account_id().equals("null")) || (status.getIn_reply_to_id() != null && !status.getIn_reply_to_id().equals("null")) ){
|
||||
Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_reply);
|
||||
img.setBounds(0,0,(int) (20 * scale + 0.5f),(int) (15 * scale + 0.5f));
|
||||
holder.notification_account_displayname.setCompoundDrawables( img, null, null, null);
|
||||
|
|
|
@ -196,7 +196,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
|||
statusListAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
if( !status.getLanguage().trim().equals(currentLocale) && !status.getLanguage().trim().equals("null")){
|
||||
if( currentLocale != null && !status.getLanguage().trim().equals(currentLocale) && !status.getLanguage().trim().equals("null")){
|
||||
holder.status_translate.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
holder.status_translate.setVisibility(View.GONE);
|
||||
|
|
|
@ -138,7 +138,7 @@ public class HomeTimelineSyncJob extends Job implements OnRetrieveHomeTimelineSe
|
|||
for(Status status: statuses){
|
||||
//The notification associated to max_id is discarded as it is supposed to have already been sent
|
||||
//Also, if the toot comes from the owner, we will avoid to warn him/her...
|
||||
if( (max_id != null && status.getId().equals(max_id)) || status.getAccount().getAcct().trim().equals(acct.trim()))
|
||||
if( (max_id != null && status.getId().equals(max_id)) || (acct != null && status.getAccount().getAcct().trim().equals(acct.trim()) ))
|
||||
continue;
|
||||
String notificationUrl = status.getAccount().getAvatar();
|
||||
|
||||
|
|
Loading…
Reference in New Issue