Last fixes - Release 1.50.3
This commit is contained in:
parent
c3d16243da
commit
554973d916
|
@ -7,8 +7,8 @@ android {
|
|||
applicationId "fr.gouv.etalab.mastodon"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 212
|
||||
versionName "1.50.2"
|
||||
versionCode 213
|
||||
versionName "1.50.3"
|
||||
multiDexEnabled true
|
||||
}
|
||||
dexOptions {
|
||||
|
|
|
@ -62,7 +62,7 @@ public class Account implements Parcelable {
|
|||
private String username;
|
||||
private SpannableString displayNameSpan;
|
||||
private String acct;
|
||||
private String display_name;
|
||||
private String display_name, stored_displayname;
|
||||
private boolean locked;
|
||||
private Date created_at;
|
||||
private int followers_count;
|
||||
|
@ -252,6 +252,14 @@ public class Account implements Parcelable {
|
|||
isBot = bot;
|
||||
}
|
||||
|
||||
public String getStored_displayname() {
|
||||
return stored_displayname;
|
||||
}
|
||||
|
||||
public void setStored_displayname(String stored_displayname) {
|
||||
this.stored_displayname = stored_displayname;
|
||||
}
|
||||
|
||||
|
||||
public enum followAction{
|
||||
FOLLOW,
|
||||
|
|
|
@ -159,6 +159,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
style = R.style.Dialog;
|
||||
}
|
||||
Drawable imgH = null;
|
||||
holder.status_date.setVisibility(View.VISIBLE);
|
||||
switch (type){
|
||||
case "mention":
|
||||
holder.status_action_container.setVisibility(View.VISIBLE);
|
||||
|
@ -222,6 +223,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
break;
|
||||
case "follow":
|
||||
holder.status_action_container.setVisibility(View.GONE);
|
||||
holder.status_date.setVisibility(View.GONE);
|
||||
if( notification.getAccount().getDisplay_name() != null && notification.getAccount().getDisplay_name().length() > 0)
|
||||
typeString = String.format("%s %s", Helper.shortnameToUnicode(notification.getAccount().getDisplay_name(), true),context.getString(R.string.notif_follow));
|
||||
else
|
||||
|
@ -253,6 +255,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
|
||||
if( notification.getAccount().getdisplayNameSpan() == null) {
|
||||
holder.notification_type.setText(typeString);
|
||||
notification.getAccount().setStored_displayname(notification.getAccount().getDisplay_name());
|
||||
notification.getAccount().setDisplay_name(typeString);
|
||||
}else
|
||||
holder.notification_type.setText(notification.getAccount().getdisplayNameSpan(), TextView.BufferType.SPANNABLE);
|
||||
|
@ -642,6 +645,7 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
public void onClick(View v) {
|
||||
Intent intent = new Intent(context, ShowAccountActivity.class);
|
||||
Bundle b = new Bundle();
|
||||
notification.getAccount().setDisplay_name(notification.getAccount().getStored_displayname());
|
||||
b.putParcelable("account", notification.getAccount());
|
||||
intent.putExtras(b);
|
||||
context.startActivity(intent);
|
||||
|
|
|
@ -776,15 +776,18 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
if( status.getReblog() == null && !isCompactMode && getItemViewType(viewHolder.getAdapterPosition()) != FOCUSED_STATUS){
|
||||
params.setMargins(0,-(int)Helper.convertDpToPixel(10, context),0,0);
|
||||
if (status.getSpoiler_text() != null && status.getSpoiler_text().trim().length() > 0 )
|
||||
paramsB.setMargins(0,0,0,0);
|
||||
paramsB.setMargins(0,(int)Helper.convertDpToPixel(10, context),0,0);
|
||||
else
|
||||
paramsB.setMargins(0,(int)Helper.convertDpToPixel(15, context),0,0);
|
||||
}else if( !isCompactMode && getItemViewType(viewHolder.getAdapterPosition()) != FOCUSED_STATUS){
|
||||
if( status.getContent() == null || status.getContent().trim().equals(""))
|
||||
params.setMargins(0,-(int)Helper.convertDpToPixel(20, context),0,0);
|
||||
else
|
||||
params.setMargins(0,0,0,0);
|
||||
paramsB.setMargins(0,0,0,0);
|
||||
if( status.getContent() == null || status.getContent().trim().equals("")) {
|
||||
params.setMargins(0, -(int) Helper.convertDpToPixel(20, context), 0, 0);
|
||||
paramsB.setMargins(0,(int) Helper.convertDpToPixel(20, context),0,0);
|
||||
}else {
|
||||
params.setMargins(0, 0, 0, 0);
|
||||
paramsB.setMargins(0,0,0,0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue