Some cleaning
This commit is contained in:
parent
2ed93d99dc
commit
502b130899
|
@ -295,10 +295,10 @@ public class EditProfileActivity extends AppCompatActivity implements OnRetrieve
|
|||
}
|
||||
});
|
||||
|
||||
Glide.with(getApplicationContext())
|
||||
Glide.with(set_profile_picture.getContext())
|
||||
.load(account.getAvatar())
|
||||
.into(set_profile_picture);
|
||||
Glide.with(getApplicationContext())
|
||||
Glide.with(set_header_picture.getContext())
|
||||
.load(account.getHeader())
|
||||
.into(set_header_picture);
|
||||
if( account.getHeader() == null || account.getHeader().contains("missing.png"))
|
||||
|
|
|
@ -1199,7 +1199,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
|||
|
||||
final ImageView imageView = new ImageView(getApplicationContext());
|
||||
imageView.setId(Integer.parseInt(attachment.getId()));
|
||||
Glide.with(getApplicationContext())
|
||||
Glide.with(imageView.getContext())
|
||||
.load(url)
|
||||
.into(imageView);
|
||||
LinearLayout.LayoutParams imParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
|
||||
|
@ -1705,7 +1705,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
|
|||
url = attachment.getUrl();
|
||||
final ImageView imageView = new ImageView(getApplicationContext());
|
||||
imageView.setId(Integer.parseInt(attachment.getId()));
|
||||
Glide.with(getApplicationContext())
|
||||
Glide.with(imageView.getContext())
|
||||
.load(url)
|
||||
.into(imageView);
|
||||
LinearLayout.LayoutParams imParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
|
||||
|
|
|
@ -124,7 +124,7 @@ public class AccountSearchDevAdapter extends BaseAdapter implements OnPostAction
|
|||
}
|
||||
Helper.changeDrawableColor(context, R.drawable.ic_lock_outline,R.color.mastodonC4);
|
||||
//Profile picture
|
||||
Glide.with(context)
|
||||
Glide.with(holder.account_pp.getContext())
|
||||
.load(account.getAvatar())
|
||||
.into(holder.account_pp);
|
||||
if( account.isFollowing()){
|
||||
|
|
|
@ -80,7 +80,7 @@ public class AccountsFollowRequestAdapter extends RecyclerView.Adapter implement
|
|||
holder.btn_reject.getBackground().setColorFilter(ContextCompat.getColor(context, R.color.red_1), PorterDuff.Mode.MULTIPLY);
|
||||
holder.account_un.setText(String.format("@%s", account.getUsername()));
|
||||
//Profile picture
|
||||
Glide.with(context)
|
||||
Glide.with(holder.account_pp.getContext())
|
||||
.load(account.getAvatar())
|
||||
.into(holder.account_pp);
|
||||
holder.account_pp.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
|
@ -149,7 +149,7 @@ public class AccountsListAdapter extends RecyclerView.Adapter implements OnPostA
|
|||
holder.account_fgc.setText(withSuffix(account.getFollowing_count()));
|
||||
holder.account_frc.setText(withSuffix(account.getFollowers_count()));
|
||||
//Profile picture
|
||||
Glide.with(context)
|
||||
Glide.with(holder.account_pp.getContext())
|
||||
.load(account.getAvatar())
|
||||
.into(holder.account_pp);
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public class AccountsReplyAdapter extends BaseAdapter{
|
|||
}
|
||||
});
|
||||
//Profile picture
|
||||
Glide.with(context)
|
||||
Glide.with(holder.account_pp.getContext())
|
||||
.load(account.getAvatar())
|
||||
.into(holder.account_pp);
|
||||
return convertView;
|
||||
|
|
|
@ -124,7 +124,7 @@ public class AccountsSearchAdapter extends ArrayAdapter<Account> implements Filt
|
|||
holder.account_dn.setVisibility(View.VISIBLE);
|
||||
}
|
||||
//Profile picture
|
||||
Glide.with(context)
|
||||
Glide.with(holder.account_pp.getContext())
|
||||
.load(account.getAvatar())
|
||||
.into(holder.account_pp);
|
||||
return convertView;
|
||||
|
|
|
@ -91,7 +91,7 @@ public class EmojisSearchAdapter extends ArrayAdapter<Emojis> implements Filtera
|
|||
|
||||
holder.emoji_shortcode.setText(String.format("%s", emoji.getShortcode()));
|
||||
//Profile picture
|
||||
Glide.with(context)
|
||||
Glide.with(holder.emoji_icon.getContext())
|
||||
.load(emoji.getUrl())
|
||||
.into(holder.emoji_icon);
|
||||
return convertView;
|
||||
|
|
|
@ -673,7 +673,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
}
|
||||
|
||||
//Profile picture
|
||||
Glide.with(context)
|
||||
Glide.with(holder.notification_account_profile.getContext())
|
||||
.load(notification.getAccount().getAvatar())
|
||||
.into(holder.notification_account_profile);
|
||||
|
||||
|
@ -874,7 +874,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
if( url == null || url.trim().equals(""))
|
||||
url = attachment.getUrl();
|
||||
if( !url.trim().contains("missing.png"))
|
||||
Glide.with(context)
|
||||
Glide.with(imageView.getContext())
|
||||
.load(url)
|
||||
.into(imageView);
|
||||
final int finalPosition = position;
|
||||
|
|
|
@ -185,7 +185,7 @@ public class SearchListAdapter extends BaseAdapter {
|
|||
holder.status_content.setAutoLinkMask(Linkify.WEB_URLS);
|
||||
holder.status_toot_date.setText(Helper.dateDiff(context, status.getCreated_at()));
|
||||
|
||||
Glide.with(context)
|
||||
Glide.with(holder.status_account_profile.getContext())
|
||||
.load(ppurl)
|
||||
.into(holder.status_account_profile);
|
||||
|
||||
|
@ -241,7 +241,7 @@ public class SearchListAdapter extends BaseAdapter {
|
|||
holder.account_fgc.setText(String.valueOf(account.getFollowing_count()));
|
||||
holder.account_frc.setText(String.valueOf(account.getFollowers_count()));
|
||||
//Profile picture
|
||||
Glide.with(context)
|
||||
Glide.with(holder.account_pp.getContext())
|
||||
.load(account.getAvatar())
|
||||
.into(holder.account_pp);
|
||||
|
||||
|
|
|
@ -591,17 +591,17 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
|
||||
|
||||
if( status.getReblog() != null) {
|
||||
Glide.with(context)
|
||||
Glide.with(holder.status_account_profile_boost.getContext())
|
||||
.load(ppurl)
|
||||
.into(holder.status_account_profile_boost);
|
||||
Glide.with(context)
|
||||
Glide.with(holder.status_account_profile_boost_by.getContext())
|
||||
.load(status.getAccount().getAvatar())
|
||||
.into(holder.status_account_profile_boost_by);
|
||||
holder.status_account_profile_boost.setVisibility(View.VISIBLE);
|
||||
holder.status_account_profile_boost_by.setVisibility(View.VISIBLE);
|
||||
holder.status_account_profile.setVisibility(View.GONE);
|
||||
}else{
|
||||
Glide.with(context)
|
||||
Glide.with(holder.status_account_profile.getContext())
|
||||
.load(ppurl)
|
||||
.into(holder.status_account_profile);
|
||||
holder.status_account_profile_boost.setVisibility(View.GONE);
|
||||
|
@ -1251,7 +1251,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
else if( attachment.getType().equals("unknown"))
|
||||
url = attachment.getRemote_url();
|
||||
if( !url.trim().contains("missing.png"))
|
||||
Glide.with(context)
|
||||
Glide.with(imageView.getContext())
|
||||
.load(url)
|
||||
.into(imageView);
|
||||
final int finalPosition = position;
|
||||
|
|
|
@ -1034,7 +1034,7 @@ public class Helper {
|
|||
if( url.startsWith("/") ){
|
||||
url = "https://" + Helper.getLiveInstance(activity) + account.getAvatar();
|
||||
}
|
||||
Glide.with(activity)
|
||||
Glide.with(profilePicture.getContext())
|
||||
.load(url)
|
||||
.into(profilePicture);
|
||||
String urlHeader = account.getHeader();
|
||||
|
|
Loading…
Reference in New Issue