Fix issue #913 - Fix Nitter feeds

This commit is contained in:
Thomas 2023-07-29 17:37:32 +02:00
parent 022d27ecb4
commit cf4b156863
4 changed files with 5 additions and 6 deletions

View File

@ -1817,8 +1817,8 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
if (networkStateReceiver != null) {
try {
unregisterReceiver(networkStateReceiver);
} catch (IllegalArgumentException illegalArgumentException) {
illegalArgumentException.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
}
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(BaseMainActivity.this);

View File

@ -210,7 +210,7 @@ public class ReorderTimelinesActivity extends BaseBarActivity implements OnStart
} else if (popupSearchInstanceBinding.setAttachmentGroup.getCheckedRadioButtonId() == R.id.twitter_accounts) {
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", "") + "/rss";
url = "https://" + nitterHost + "/" + instanceName.replaceAll("[ ]+", ",").replaceAll("\\s", "") + "/with_replies/rss";
}
OkHttpClient client = new OkHttpClient.Builder()
.connectTimeout(10, TimeUnit.SECONDS)

View File

@ -263,14 +263,14 @@ public interface MastodonTimelinesService {
);
@Headers({"Accept: text/html,application/xhtml+xml,application/xml"})
@GET("{names}/rss")
@GET("{names}/with_replies/rss")
Call<Nitter> getNitter(
@Path("names") String id,
@Query("max_position") String max_position
);
@Headers({"Accept: text/html,application/xhtml+xml,application/xml"})
@GET("{account}/rss")
@GET("{account}/with_replies/rss")
Call<Nitter> getNitterAccount(
@Path("account") String account
);

View File

@ -260,7 +260,6 @@ public class TimelinesVM extends AndroidViewModel {
if (publicTlCall != null) {
try {
Response<Nitter> publicTlResponse = publicTlCall.execute();
if (publicTlResponse.isSuccessful()) {
Nitter rssResponse = publicTlResponse.body();
List<Status> statusList = new ArrayList<>();