Fix emoji in names
This commit is contained in:
parent
cbf748ea59
commit
0fc70a9413
|
@ -537,6 +537,7 @@ public class Account implements Parcelable {
|
|||
if( noteSpan != null)
|
||||
account.setNoteSpan(noteSpan);
|
||||
account.setFieldsSpan(fieldsSpan);
|
||||
if( listener != null)
|
||||
listener.onRetrieveEmojiAccount(account);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -528,7 +528,7 @@ public class Status implements Parcelable{
|
|||
final List<Emojis> emojis = status.getReblog() != null ? status.getReblog().getEmojis() : status.getEmojis();
|
||||
final List<Emojis> emojisAccounts = status.getReblog() != null ?status.getReblog().getAccount().getEmojis():status.getAccount().getEmojis();
|
||||
|
||||
|
||||
status.getAccount().makeEmojisAccount(context, null);
|
||||
String displayName;
|
||||
if( status.getReblog() != null){
|
||||
displayName = Helper.shortnameToUnicode(status.getReblog().getAccount().getDisplay_name(), true);
|
||||
|
@ -536,7 +536,6 @@ public class Status implements Parcelable{
|
|||
}else {
|
||||
displayName = String.format("@%s",status.getAccount().getAcct());
|
||||
}
|
||||
Log.v(Helper.TAG,"displayName: " + displayName);
|
||||
displayNameSpan = new SpannableString(displayName);
|
||||
|
||||
if( emojisAccounts != null)
|
||||
|
|
|
@ -1056,6 +1056,11 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
|
||||
@Override
|
||||
public void onRetrieveEmojiAccount(Account account) {
|
||||
for( Notification notification: notifications){
|
||||
if( notification.getAccount().equals(account)){
|
||||
notifyNotificationChanged(notification);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
|
|
|
@ -123,7 +123,7 @@ import static fr.gouv.etalab.mastodon.helper.Helper.getLiveInstance;
|
|||
* Created by Thomas on 24/04/2017.
|
||||
* Adapter for Status
|
||||
*/
|
||||
public class StatusListAdapter extends RecyclerView.Adapter implements OnPostActionInterface, OnRetrieveFeedsInterface, OnRetrieveEmojiInterface, OnRetrieveRepliesInterface, OnRetrieveCardInterface, OnRetrieveEmojiAccountInterface {
|
||||
public class StatusListAdapter extends RecyclerView.Adapter implements OnPostActionInterface, OnRetrieveFeedsInterface, OnRetrieveEmojiInterface, OnRetrieveRepliesInterface, OnRetrieveCardInterface {
|
||||
|
||||
private Context context;
|
||||
private List<Status> statuses;
|
||||
|
@ -215,10 +215,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
notifyStatusChanged(modifiedStatus.get(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRetrieveEmojiAccount(Account account) {
|
||||
|
||||
}
|
||||
|
||||
private class ViewHolderEmpty extends RecyclerView.ViewHolder{
|
||||
ViewHolderEmpty(View itemView) {
|
||||
|
@ -658,7 +654,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
//-------- END -> Manages translations
|
||||
|
||||
|
||||
status.getAccount().makeEmojisAccount(context, StatusListAdapter.this);
|
||||
//Displays name & emoji in toot header
|
||||
final String ppurl;
|
||||
if( status.getReblog() != null){
|
||||
|
|
|
@ -91,26 +91,19 @@
|
|||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/status_account_displayname"
|
||||
android:visibility="gone"
|
||||
android:maxLines="1"
|
||||
android:drawablePadding="2dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:textSize="12sp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/status_account_username"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/status_spoiler_container"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in New Issue