@Override protected boolean ok() { int deleted = tagService.delete(tag); TagData tagData = PluginServices.getTagDataService().getTag(tag, TagData.ID, TagData.DELETION_DATE); if (tagData != null) { tagData.setValue(TagData.DELETION_DATE, DateUtilities.now()); PluginServices.getTagDataService().save(tagData); } Toast.makeText(this, getString(R.string.TEA_tags_deleted, tag, deleted), Toast.LENGTH_SHORT) .show(); return true; }
private static void setShowFeaturedLists() { // Show featured lists if necessary boolean showFeaturedLists = false; TodorooCursor<TagData> featLists = PluginServices.getTagDataService() .query( Query.select(TagData.ID) .where(Functions.bitwiseAnd(TagData.FLAGS, TagData.FLAG_FEATURED).gt(0)) .limit(1)); try { showFeaturedLists = featLists.getCount() > 0; } finally { featLists.close(); } Preferences.setBoolean( FeaturedListFilterExposer.PREF_SHOULD_SHOW_FEATURED_LISTS, showFeaturedLists); }