Loading app/src/main/java/app/fedilab/android/mastodon/activities/ReorderTimelinesActivity.java +6 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,10 @@ public class ReorderTimelinesActivity extends BaseBarActivity implements OnStart SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(ReorderTimelinesActivity.this); String nitterHost = sharedpreferences.getString(getString(R.string.SET_NITTER_HOST), getString(R.string.DEFAULT_NITTER_HOST)).toLowerCase(); url = "https://" + nitterHost + "/" + instanceName.replaceAll("[ ]+", ",").replaceAll("\\s", "") + "/with_replies/rss"; }else if (popupSearchInstanceBinding.setAttachmentGroup.getCheckedRadioButtonId() == R.id.twitter_tags) { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(ReorderTimelinesActivity.this); String nitterHost = sharedpreferences.getString(getString(R.string.SET_NITTER_HOST), getString(R.string.DEFAULT_NITTER_HOST)).toLowerCase(); url = "https://" + nitterHost + "/search?f=tweets&q=" + instanceName.replaceAll("[ ]+", "+or+").replaceAll("\\s", "") + "&e-nativeretweets=on"; } OkHttpClient client = new OkHttpClient.Builder() .connectTimeout(10, TimeUnit.SECONDS) Loading Loading @@ -257,6 +261,8 @@ public class ReorderTimelinesActivity extends BaseBarActivity implements OnStart instanceType = RemoteInstance.InstanceType.GNU; } else if (popupSearchInstanceBinding.setAttachmentGroup.getCheckedRadioButtonId() == R.id.twitter_accounts) { instanceType = RemoteInstance.InstanceType.NITTER; } else if (popupSearchInstanceBinding.setAttachmentGroup.getCheckedRadioButtonId() == R.id.twitter_tags) { instanceType = RemoteInstance.InstanceType.NITTER_TAG; } RemoteInstance remoteInstance = new RemoteInstance(); remoteInstance.type = instanceType; Loading app/src/main/java/app/fedilab/android/mastodon/client/entities/app/RemoteInstance.java +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ public class RemoteInstance implements Serializable { PEERTUBE("PEERTUBE"), @SerializedName("NITTER") NITTER("NITTER"), @SerializedName("NITTER_TAG") NITTER_TAG("NITTER_TAG"), @SerializedName("MISSKEY") MISSKEY("MISSKEY"), @SerializedName("LEMMY") Loading app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java +13 −5 Original line number Diff line number Diff line Loading @@ -341,10 +341,10 @@ public class PinnedTimelineHelper { break; case REMOTE: name = pinnedTimeline.remoteInstance.host; if (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER) { if (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG) { String remoteInstance = sharedpreferences.getString(activity.getString(R.string.SET_NITTER_HOST), activity.getString(R.string.DEFAULT_NITTER_HOST)).toLowerCase(); //Custom name for Nitter instances if (pinnedTimeline.remoteInstance.displayName != null && pinnedTimeline.remoteInstance.displayName.trim().length() > 0) { if (pinnedTimeline.remoteInstance.displayName != null && !pinnedTimeline.remoteInstance.displayName.trim().isEmpty()) { name = pinnedTimeline.remoteInstance.displayName; } ident = "@R@" + remoteInstance; Loading Loading @@ -378,6 +378,7 @@ public class PinnedTimelineHelper { case MISSKEY: tabCustomViewBinding.icon.setImageResource(R.drawable.misskey); break; case NITTER_TAG: case NITTER: tabCustomViewBinding.icon.setImageResource(R.drawable.nitter); break; Loading Loading @@ -471,9 +472,10 @@ public class PinnedTimelineHelper { case PIXELFED: item.setIcon(R.drawable.pixelfed); break; case NITTER_TAG: case NITTER: item.setIcon(R.drawable.nitter); if (pinnedTimeline.remoteInstance.displayName != null && pinnedTimeline.remoteInstance.displayName.trim().length() > 0) { if (pinnedTimeline.remoteInstance.displayName != null && !pinnedTimeline.remoteInstance.displayName.trim().isEmpty()) { item.setTitle(pinnedTimeline.remoteInstance.displayName); } else { item.setTitle(pinnedTimeline.remoteInstance.host); Loading Loading @@ -525,7 +527,7 @@ public class PinnedTimelineHelper { bubbleClick(activity, finalPinned, v, activityMainBinding, finalI, activityMainBinding.tabLayout.getTabAt(finalI).getTag().toString()); break; case REMOTE: if (pinnedTimelineVisibleList.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER) { if (pinnedTimelineVisibleList.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER && pinnedTimelineVisibleList.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER_TAG) { instanceClick(activity, finalPinned, v, activityMainBinding, finalI, activityMainBinding.tabLayout.getTabAt(finalI).getTag().toString()); } else { nitterClick(activity, finalPinned, v, activityMainBinding, finalI, activityMainBinding.tabLayout.getTabAt(finalI).getTag().toString()); Loading Loading @@ -1528,6 +1530,12 @@ public class PinnedTimelineHelper { PopupMenu popup = new PopupMenu(activity, view); popup.getMenuInflater() .inflate(R.menu.option_nitter_timeline, popup.getMenu()); if(remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG) { MenuItem item = popup.getMenu().findItem(R.id.action_nitter_manage_accounts); if(item != null) { item.setTitle(R.string.manage_tags); } } int finalOffSetPosition = offSetPosition; popup.setOnMenuItemClickListener(item -> { int itemId = item.getItemId(); Loading @@ -1547,7 +1555,7 @@ public class PinnedTimelineHelper { } dialogBuilder.setPositiveButton(R.string.validate, (dialog, id) -> { String values = editTextName.getText().toString(); if (values.trim().length() == 0) { if (values.trim().isEmpty()) { values = remoteInstance.displayName; } remoteInstance.displayName = values; Loading app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderTabAdapter.java +3 −2 Original line number Diff line number Diff line Loading @@ -100,14 +100,15 @@ public class ReorderTabAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol case GNU: holder.binding.icon.setImageResource(R.drawable.ic_gnu_social); break; case NITTER_TAG: case NITTER: holder.binding.icon.setImageResource(R.drawable.nitter); break; } if (pinned.pinnedTimelines.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER) { if (pinned.pinnedTimelines.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER && pinned.pinnedTimelines.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER_TAG) { holder.binding.text.setText(pinned.pinnedTimelines.get(position).remoteInstance.host); } else { if (pinned.pinnedTimelines.get(position).remoteInstance.displayName != null && pinned.pinnedTimelines.get(position).remoteInstance.displayName.trim().length() > 0) { if (pinned.pinnedTimelines.get(position).remoteInstance.displayName != null && !pinned.pinnedTimelines.get(position).remoteInstance.displayName.trim().isEmpty()) { holder.binding.text.setText(pinned.pinnedTimelines.get(position).remoteInstance.displayName); } else { holder.binding.text.setText(pinned.pinnedTimelines.get(position).remoteInstance.host); Loading app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java +8 −8 Original line number Diff line number Diff line Loading @@ -420,7 +420,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. pinnedTimeline = (PinnedTimeline) bundle.getSerializable(Helper.ARG_REMOTE_INSTANCE); canBeFederated = true; if (pinnedTimeline != null && pinnedTimeline.remoteInstance != null) { if (pinnedTimeline.remoteInstance.type != RemoteInstance.InstanceType.NITTER) { if (pinnedTimeline.remoteInstance.type != RemoteInstance.InstanceType.NITTER && pinnedTimeline.remoteInstance.type != RemoteInstance.InstanceType.NITTER_TAG) { remoteInstance = pinnedTimeline.remoteInstance.host; } else { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity()); Loading Loading @@ -471,7 +471,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. } else if (list_id != null) { ident = "@l@" + list_id; } else if (remoteInstance != null && !checkRemotely) { if (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER) { if (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG) { ident = "@R@" + pinnedTimeline.remoteInstance.host; } else { ident = "@R@" + remoteInstance; Loading Loading @@ -562,7 +562,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. } //Update the timeline with new statuses int insertedStatus; if(pinnedTimeline!= null && pinnedTimeline.remoteInstance != null && pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER) { if(pinnedTimeline!= null && pinnedTimeline.remoteInstance != null && (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG)) { insertedStatus = fetched_statuses.statuses.size(); int fromPosition = timelineStatuses.size(); timelineStatuses.addAll(fetched_statuses.statuses); Loading Loading @@ -685,7 +685,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. max_id = statuses.pagination.max_id; } //For Lemmy and Nitter pagination if (pinnedTimeline != null && pinnedTimeline.remoteInstance != null && (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.LEMMY || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER)) { if (pinnedTimeline != null && pinnedTimeline.remoteInstance != null && (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.LEMMY || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG)) { max_id = statuses.pagination.max_id; } if (min_id == null || (statuses.pagination.min_id != null && Helper.compareTo(statuses.pagination.min_id, min_id) > 0)) { Loading Loading @@ -1049,20 +1049,20 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. routeCommon(direction, fetchingMissing, fetchStatus); } else if (timelineType == Timeline.TimeLineEnum.REMOTE) { //REMOTE TIMELINE //NITTER TIMELINES if (pinnedTimeline != null && pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER) { if (pinnedTimeline != null && (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG)) { if (direction == null) { timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.host, null) timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.type, pinnedTimeline.remoteInstance.host, null) .observe(getViewLifecycleOwner(), nitterStatuses -> { initialStatuses = nitterStatuses; initializeStatusesCommonView(nitterStatuses); }); } else if (direction == DIRECTION.BOTTOM) { timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.host, max_id) timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.type, pinnedTimeline.remoteInstance.host, max_id) .observe(getViewLifecycleOwner(), statusesBottom -> dealWithPagination(statusesBottom, DIRECTION.BOTTOM, false, true, fetchStatus)); } else if (direction == DIRECTION.TOP) { flagLoading = false; } else if (direction == DIRECTION.REFRESH || direction == DIRECTION.SCROLL_TOP) { timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.host, null) timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.type, pinnedTimeline.remoteInstance.host, null) .observe(getViewLifecycleOwner(), statusesRefresh -> { if (statusAdapter != null) { dealWithPagination(statusesRefresh, direction, true, true, fetchStatus); Loading Loading
app/src/main/java/app/fedilab/android/mastodon/activities/ReorderTimelinesActivity.java +6 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,10 @@ public class ReorderTimelinesActivity extends BaseBarActivity implements OnStart SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(ReorderTimelinesActivity.this); String nitterHost = sharedpreferences.getString(getString(R.string.SET_NITTER_HOST), getString(R.string.DEFAULT_NITTER_HOST)).toLowerCase(); url = "https://" + nitterHost + "/" + instanceName.replaceAll("[ ]+", ",").replaceAll("\\s", "") + "/with_replies/rss"; }else if (popupSearchInstanceBinding.setAttachmentGroup.getCheckedRadioButtonId() == R.id.twitter_tags) { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(ReorderTimelinesActivity.this); String nitterHost = sharedpreferences.getString(getString(R.string.SET_NITTER_HOST), getString(R.string.DEFAULT_NITTER_HOST)).toLowerCase(); url = "https://" + nitterHost + "/search?f=tweets&q=" + instanceName.replaceAll("[ ]+", "+or+").replaceAll("\\s", "") + "&e-nativeretweets=on"; } OkHttpClient client = new OkHttpClient.Builder() .connectTimeout(10, TimeUnit.SECONDS) Loading Loading @@ -257,6 +261,8 @@ public class ReorderTimelinesActivity extends BaseBarActivity implements OnStart instanceType = RemoteInstance.InstanceType.GNU; } else if (popupSearchInstanceBinding.setAttachmentGroup.getCheckedRadioButtonId() == R.id.twitter_accounts) { instanceType = RemoteInstance.InstanceType.NITTER; } else if (popupSearchInstanceBinding.setAttachmentGroup.getCheckedRadioButtonId() == R.id.twitter_tags) { instanceType = RemoteInstance.InstanceType.NITTER_TAG; } RemoteInstance remoteInstance = new RemoteInstance(); remoteInstance.type = instanceType; Loading
app/src/main/java/app/fedilab/android/mastodon/client/entities/app/RemoteInstance.java +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ public class RemoteInstance implements Serializable { PEERTUBE("PEERTUBE"), @SerializedName("NITTER") NITTER("NITTER"), @SerializedName("NITTER_TAG") NITTER_TAG("NITTER_TAG"), @SerializedName("MISSKEY") MISSKEY("MISSKEY"), @SerializedName("LEMMY") Loading
app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java +13 −5 Original line number Diff line number Diff line Loading @@ -341,10 +341,10 @@ public class PinnedTimelineHelper { break; case REMOTE: name = pinnedTimeline.remoteInstance.host; if (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER) { if (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG) { String remoteInstance = sharedpreferences.getString(activity.getString(R.string.SET_NITTER_HOST), activity.getString(R.string.DEFAULT_NITTER_HOST)).toLowerCase(); //Custom name for Nitter instances if (pinnedTimeline.remoteInstance.displayName != null && pinnedTimeline.remoteInstance.displayName.trim().length() > 0) { if (pinnedTimeline.remoteInstance.displayName != null && !pinnedTimeline.remoteInstance.displayName.trim().isEmpty()) { name = pinnedTimeline.remoteInstance.displayName; } ident = "@R@" + remoteInstance; Loading Loading @@ -378,6 +378,7 @@ public class PinnedTimelineHelper { case MISSKEY: tabCustomViewBinding.icon.setImageResource(R.drawable.misskey); break; case NITTER_TAG: case NITTER: tabCustomViewBinding.icon.setImageResource(R.drawable.nitter); break; Loading Loading @@ -471,9 +472,10 @@ public class PinnedTimelineHelper { case PIXELFED: item.setIcon(R.drawable.pixelfed); break; case NITTER_TAG: case NITTER: item.setIcon(R.drawable.nitter); if (pinnedTimeline.remoteInstance.displayName != null && pinnedTimeline.remoteInstance.displayName.trim().length() > 0) { if (pinnedTimeline.remoteInstance.displayName != null && !pinnedTimeline.remoteInstance.displayName.trim().isEmpty()) { item.setTitle(pinnedTimeline.remoteInstance.displayName); } else { item.setTitle(pinnedTimeline.remoteInstance.host); Loading Loading @@ -525,7 +527,7 @@ public class PinnedTimelineHelper { bubbleClick(activity, finalPinned, v, activityMainBinding, finalI, activityMainBinding.tabLayout.getTabAt(finalI).getTag().toString()); break; case REMOTE: if (pinnedTimelineVisibleList.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER) { if (pinnedTimelineVisibleList.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER && pinnedTimelineVisibleList.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER_TAG) { instanceClick(activity, finalPinned, v, activityMainBinding, finalI, activityMainBinding.tabLayout.getTabAt(finalI).getTag().toString()); } else { nitterClick(activity, finalPinned, v, activityMainBinding, finalI, activityMainBinding.tabLayout.getTabAt(finalI).getTag().toString()); Loading Loading @@ -1528,6 +1530,12 @@ public class PinnedTimelineHelper { PopupMenu popup = new PopupMenu(activity, view); popup.getMenuInflater() .inflate(R.menu.option_nitter_timeline, popup.getMenu()); if(remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG) { MenuItem item = popup.getMenu().findItem(R.id.action_nitter_manage_accounts); if(item != null) { item.setTitle(R.string.manage_tags); } } int finalOffSetPosition = offSetPosition; popup.setOnMenuItemClickListener(item -> { int itemId = item.getItemId(); Loading @@ -1547,7 +1555,7 @@ public class PinnedTimelineHelper { } dialogBuilder.setPositiveButton(R.string.validate, (dialog, id) -> { String values = editTextName.getText().toString(); if (values.trim().length() == 0) { if (values.trim().isEmpty()) { values = remoteInstance.displayName; } remoteInstance.displayName = values; Loading
app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ReorderTabAdapter.java +3 −2 Original line number Diff line number Diff line Loading @@ -100,14 +100,15 @@ public class ReorderTabAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol case GNU: holder.binding.icon.setImageResource(R.drawable.ic_gnu_social); break; case NITTER_TAG: case NITTER: holder.binding.icon.setImageResource(R.drawable.nitter); break; } if (pinned.pinnedTimelines.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER) { if (pinned.pinnedTimelines.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER && pinned.pinnedTimelines.get(position).remoteInstance.type != RemoteInstance.InstanceType.NITTER_TAG) { holder.binding.text.setText(pinned.pinnedTimelines.get(position).remoteInstance.host); } else { if (pinned.pinnedTimelines.get(position).remoteInstance.displayName != null && pinned.pinnedTimelines.get(position).remoteInstance.displayName.trim().length() > 0) { if (pinned.pinnedTimelines.get(position).remoteInstance.displayName != null && !pinned.pinnedTimelines.get(position).remoteInstance.displayName.trim().isEmpty()) { holder.binding.text.setText(pinned.pinnedTimelines.get(position).remoteInstance.displayName); } else { holder.binding.text.setText(pinned.pinnedTimelines.get(position).remoteInstance.host); Loading
app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java +8 −8 Original line number Diff line number Diff line Loading @@ -420,7 +420,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. pinnedTimeline = (PinnedTimeline) bundle.getSerializable(Helper.ARG_REMOTE_INSTANCE); canBeFederated = true; if (pinnedTimeline != null && pinnedTimeline.remoteInstance != null) { if (pinnedTimeline.remoteInstance.type != RemoteInstance.InstanceType.NITTER) { if (pinnedTimeline.remoteInstance.type != RemoteInstance.InstanceType.NITTER && pinnedTimeline.remoteInstance.type != RemoteInstance.InstanceType.NITTER_TAG) { remoteInstance = pinnedTimeline.remoteInstance.host; } else { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity()); Loading Loading @@ -471,7 +471,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. } else if (list_id != null) { ident = "@l@" + list_id; } else if (remoteInstance != null && !checkRemotely) { if (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER) { if (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG) { ident = "@R@" + pinnedTimeline.remoteInstance.host; } else { ident = "@R@" + remoteInstance; Loading Loading @@ -562,7 +562,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. } //Update the timeline with new statuses int insertedStatus; if(pinnedTimeline!= null && pinnedTimeline.remoteInstance != null && pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER) { if(pinnedTimeline!= null && pinnedTimeline.remoteInstance != null && (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG)) { insertedStatus = fetched_statuses.statuses.size(); int fromPosition = timelineStatuses.size(); timelineStatuses.addAll(fetched_statuses.statuses); Loading Loading @@ -685,7 +685,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. max_id = statuses.pagination.max_id; } //For Lemmy and Nitter pagination if (pinnedTimeline != null && pinnedTimeline.remoteInstance != null && (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.LEMMY || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER)) { if (pinnedTimeline != null && pinnedTimeline.remoteInstance != null && (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.LEMMY || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG)) { max_id = statuses.pagination.max_id; } if (min_id == null || (statuses.pagination.min_id != null && Helper.compareTo(statuses.pagination.min_id, min_id) > 0)) { Loading Loading @@ -1049,20 +1049,20 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. routeCommon(direction, fetchingMissing, fetchStatus); } else if (timelineType == Timeline.TimeLineEnum.REMOTE) { //REMOTE TIMELINE //NITTER TIMELINES if (pinnedTimeline != null && pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER) { if (pinnedTimeline != null && (pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER || pinnedTimeline.remoteInstance.type == RemoteInstance.InstanceType.NITTER_TAG)) { if (direction == null) { timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.host, null) timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.type, pinnedTimeline.remoteInstance.host, null) .observe(getViewLifecycleOwner(), nitterStatuses -> { initialStatuses = nitterStatuses; initializeStatusesCommonView(nitterStatuses); }); } else if (direction == DIRECTION.BOTTOM) { timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.host, max_id) timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.type, pinnedTimeline.remoteInstance.host, max_id) .observe(getViewLifecycleOwner(), statusesBottom -> dealWithPagination(statusesBottom, DIRECTION.BOTTOM, false, true, fetchStatus)); } else if (direction == DIRECTION.TOP) { flagLoading = false; } else if (direction == DIRECTION.REFRESH || direction == DIRECTION.SCROLL_TOP) { timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.host, null) timelinesVM.getNitterHTML(pinnedTimeline.remoteInstance.type, pinnedTimeline.remoteInstance.host, null) .observe(getViewLifecycleOwner(), statusesRefresh -> { if (statusAdapter != null) { dealWithPagination(statusesRefresh, direction, true, true, fetchStatus); Loading