mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix issue #913 - Fix Nitter feeds
This commit is contained in:
parent
022d27ecb4
commit
cf4b156863
4 changed files with 5 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
);
|
||||
|
|
|
@ -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<>();
|
||||
|
|
Loading…
Reference in a new issue