Minor diverse changes

This commit is contained in:
Shinokuni 2019-03-28 16:56:55 +01:00
parent 34e8c1b4c2
commit d20d1e3ed1
4 changed files with 5 additions and 13 deletions

View File

@ -183,12 +183,7 @@ public class AddFeedActivity extends AppCompatActivity implements View.OnClickLi
viewModel.parseUrl(finalUrl) viewModel.parseUrl(finalUrl)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(new SingleObserver<List<ParsingResult>>() { .subscribe(new DisposableSingleObserver<List<ParsingResult>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override @Override
public void onSuccess(List<ParsingResult> parsingResultList) { public void onSuccess(List<ParsingResult> parsingResultList) {
displayParseResults(parsingResultList); displayParseResults(parsingResultList);

View File

@ -138,7 +138,7 @@
android:layout_height="16dp" android:layout_height="16dp"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@drawable/ic_read_time" /> android:src="@drawable/ic_read_time_grey" />
<TextView <TextView
android:id="@+id/activity_item_readtime" android:id="@+id/activity_item_readtime"

View File

@ -68,7 +68,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_toLeftOf="@id/item_date"> android:layout_toLeftOf="@id/item_date_layout">
<ImageView <ImageView
android:id="@+id/item_feed_icon" android:id="@+id/item_feed_icon"

View File

@ -44,16 +44,13 @@ public class RSSQuery {
*/ */
public RSSQueryResult queryUrl(String url, Map<String, String> headers) throws Exception { public RSSQueryResult queryUrl(String url, Map<String, String> headers) throws Exception {
Response response = query(url, headers); Response response = query(url, headers);
RSSQueryResult queryResult;
if (response.isSuccessful()) { if (response.isSuccessful()) {
String header = response.header(LibUtils.CONTENT_TYPE_HEADER); String header = response.header(LibUtils.CONTENT_TYPE_HEADER);
RSSType type = getRSSType(header); RSSType type = getRSSType(header);
if (type == null) { if (type == null)
queryResult = new RSSQueryResult(new UnknownFormatException("bad content type : " + header + "for " + url)); return new RSSQueryResult(new UnknownFormatException("bad content type : " + header + "for " + url));
return queryResult;
}
return parseFeed(response.body().byteStream(), type, response); return parseFeed(response.body().byteStream(), type, response);
} else if (response.code() == 304) } else if (response.code() == 304)