remove toggle unread article menu item

This commit is contained in:
Andrew Dolgov 2014-11-12 09:23:27 +03:00
parent 437c52fea4
commit fba3486928
4 changed files with 1 additions and 44 deletions

View File

@ -1013,18 +1013,6 @@ public class OnlineActivity extends CommonActivity {
} }
} }
return true; return true;
case R.id.set_unread:
if (ap != null && ap.getSelectedArticle() != null) {
Article a = ap.getSelectedArticle();
if (a != null) {
a.unread = !a.unread;
saveArticleUnread(a);
}
if (hf != null) hf.notifyUpdated();
}
return true;
case R.id.set_labels: case R.id.set_labels:
if (ap != null && ap.getSelectedArticle() != null) { if (ap != null && ap.getSelectedArticle() != null) {
if (getApiLevel() != 7) { if (getApiLevel() != 7) {
@ -1575,9 +1563,6 @@ public class OnlineActivity extends CommonActivity {
m_menu.findItem(R.id.toggle_published).setIcon(article.published ? R.drawable.ic_menu_published_light : m_menu.findItem(R.id.toggle_published).setIcon(article.published ? R.drawable.ic_menu_published_light :
R.drawable.ic_menu_unpublished_light); R.drawable.ic_menu_unpublished_light);
m_menu.findItem(R.id.set_unread).setIcon(article.unread ? R.drawable.ic_unread_light :
R.drawable.ic_read_light);
} }
} }

View File

@ -539,20 +539,6 @@ public class OfflineActivity extends CommonActivity {
refresh(); refresh();
} }
return true; return true;
case R.id.set_unread:
if (oap != null) {
int articleId = oap.getSelectedArticleId();
SQLiteStatement stmt = getWritableDb().compileStatement(
"UPDATE articles SET modified = 1, unread = 1 WHERE "
+ BaseColumns._ID + " = ?");
stmt.bindLong(1, articleId);
stmt.execute();
stmt.close();
refresh();
}
return true;
default: default:
Log.d(TAG, "onOptionsItemSelected, unhandled id=" + item.getItemId()); Log.d(TAG, "onOptionsItemSelected, unhandled id=" + item.getItemId());
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
@ -606,9 +592,6 @@ public class OfflineActivity extends CommonActivity {
m_menu.findItem(R.id.toggle_published).setIcon(published ? R.drawable.ic_menu_published_light : m_menu.findItem(R.id.toggle_published).setIcon(published ? R.drawable.ic_menu_published_light :
R.drawable.ic_menu_unpublished_light); R.drawable.ic_menu_unpublished_light);
m_menu.findItem(R.id.set_unread).setIcon(unread ? R.drawable.ic_unread_light :
R.drawable.ic_read_light);
article.close(); article.close();
} }
} }

View File

@ -140,12 +140,6 @@
android:id="@+id/catchup_above" android:id="@+id/catchup_above"
android:title="@string/article_mark_read_above"/> android:title="@string/article_mark_read_above"/>
<item
android:id="@+id/set_unread"
android:icon="@drawable/ic_read_light"
app:showAsAction=""
android:title="@string/article_set_unread"/>
</group> </group>
<item <item

View File

@ -84,11 +84,6 @@
android:icon="@drawable/ic_share_light" android:icon="@drawable/ic_share_light"
app:showAsAction="ifRoom" app:showAsAction="ifRoom"
android:title="@string/share_article"/> android:title="@string/share_article"/>
<item
android:id="@+id/set_unread"
android:icon="@drawable/ic_read_light"
app:showAsAction=""
android:title="@string/article_set_unread"/>
<item <item
android:id="@+id/catchup_above" android:id="@+id/catchup_above"
android:title="@string/article_mark_read_above"/> android:title="@string/article_mark_read_above"/>