refactoring is bad when you're dumb

This commit is contained in:
Andrew Dolgov 2014-11-03 20:07:24 +04:00
parent 6589f154c6
commit 6cb29c3889
3 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss" package="org.fox.ttrss"
android:versionCode="263" android:versionCode="264"
android:versionName="1.59" > android:versionName="1.59" >
<uses-sdk <uses-sdk

View File

@ -57,10 +57,11 @@ public class ArticleFragment extends Fragment {
public void onCreateContextMenu(ContextMenu menu, View v, public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) { ContextMenuInfo menuInfo) {
if (v.getId() == R.id.content) { if (v.getId() == R.id.article_content) {
HitTestResult result = ((WebView)v).getHitTestResult(); HitTestResult result = ((WebView)v).getHitTestResult();
if (result != null && (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE)) { if (result != null && (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE)) {
menu.setHeaderTitle(result.getExtra()); menu.setHeaderTitle(result.getExtra());
getActivity().getMenuInflater().inflate(R.menu.article_content_img_context_menu, menu); getActivity().getMenuInflater().inflate(R.menu.article_content_img_context_menu, menu);

View File

@ -90,7 +90,7 @@ public class OfflineArticleFragment extends Fragment {
String title = m_cursor.getString(m_cursor.getColumnIndex("title")); String title = m_cursor.getString(m_cursor.getColumnIndex("title"));
if (v.getId() == R.id.content) { if (v.getId() == R.id.article_content) {
HitTestResult result = ((WebView)v).getHitTestResult(); HitTestResult result = ((WebView)v).getHitTestResult();
if (result != null && (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE)) { if (result != null && (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE)) {