re-add the dreaded button to offline
This commit is contained in:
parent
3071df1abe
commit
d37b2f6e69
@ -465,6 +465,20 @@ public class OfflineActivity extends CommonActivity {
|
||||
refresh();
|
||||
}
|
||||
return true;
|
||||
case R.id.toggle_unread:
|
||||
if (oap != null) {
|
||||
int articleId = oap.getSelectedArticleId();
|
||||
|
||||
SQLiteStatement stmt = getDatabase().compileStatement(
|
||||
"UPDATE articles SET modified = 1, unread = NOT unread WHERE "
|
||||
+ BaseColumns._ID + " = ?");
|
||||
stmt.bindLong(1, articleId);
|
||||
stmt.execute();
|
||||
stmt.close();
|
||||
|
||||
refresh();
|
||||
}
|
||||
return true;
|
||||
/* case R.id.selection_select_none:
|
||||
deselectAllArticles();
|
||||
return true; */
|
||||
@ -596,6 +610,9 @@ public class OfflineActivity extends CommonActivity {
|
||||
m_menu.findItem(R.id.toggle_published).setIcon(published ? R.drawable.ic_checkbox_marked :
|
||||
R.drawable.ic_rss_box);
|
||||
|
||||
m_menu.findItem(R.id.toggle_unread).setIcon(unread ? R.drawable.ic_email :
|
||||
R.drawable.ic_email_open);
|
||||
|
||||
article.close();
|
||||
}
|
||||
}
|
||||
|
@ -53,11 +53,11 @@
|
||||
android:icon="@drawable/ic_rss_box"
|
||||
app:showAsAction="ifRoom"
|
||||
android:title="@string/article_toggle_published"/>
|
||||
<!-- <item
|
||||
<item
|
||||
android:id="@+id/toggle_unread"
|
||||
android:icon="@drawable/ic_email"
|
||||
app:showAsAction="ifRoom"
|
||||
android:title="@string/article_toggle_unread"/> -->
|
||||
android:title="@string/article_toggle_unread"/>
|
||||
<!-- <item
|
||||
android:id="@+id/share_article"
|
||||
android:icon="@drawable/ic_share"
|
||||
|
Loading…
Reference in New Issue
Block a user