Commit f9425177 authored by Thomas's avatar Thomas
Browse files

Fix Pixelfed view not used for Pixelfed accounts

parent d98ba219
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -34,6 +34,8 @@ import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_ID;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_INSTANCE;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_INSTANCE;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_SOFTWARE;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_SOFTWARE;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_TOKEN;
import static app.fedilab.android.mastodon.helper.Helper.PREF_USER_TOKEN;
import static app.fedilab.android.mastodon.helper.Helper.TAG;
import static app.fedilab.android.mastodon.helper.Helper.getCurrentAccount;


import android.annotation.SuppressLint;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Activity;
@@ -57,6 +59,7 @@ import android.os.Looper;
import android.text.Html;
import android.text.Html;
import android.text.SpannableString;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.MotionEvent;
@@ -3074,10 +3077,15 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
            } else {
            } else {
                if (isVisible(timelineType, statusList.get(position), statusList)) {
                if (isVisible(timelineType, statusList.get(position), statusList)) {
                    if (visiblePixelfed && isVisiblePixelfed(statusList.get(position)) && timelineType != Timeline.TimeLineEnum.UNKNOWN) {
                    if (visiblePixelfed && isVisiblePixelfed(statusList.get(position)) && timelineType != Timeline.TimeLineEnum.UNKNOWN) {

                        return STATUS_PIXELFED;
                    } else {
                        if(timelineType != Timeline.TimeLineEnum.UNKNOWN && getCurrentAccount(context).software != null && getCurrentAccount(context).software.trim().toLowerCase().equals("pixelfed")) {
                            return STATUS_PIXELFED;
                            return STATUS_PIXELFED;
                        } else {
                        } else {
                            return STATUS_VISIBLE;
                            return STATUS_VISIBLE;
                        }
                        }
                    }
                } else {
                } else {
                    return STATUS_HIDDEN;
                    return STATUS_HIDDEN;
                }
                }