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