Renamed simplechapter variable names

This commit is contained in:
daniel oeh 2012-09-21 18:45:34 +02:00
parent cc18f609d0
commit 2ebef34408
4 changed files with 13 additions and 13 deletions

View File

@ -16,7 +16,7 @@ import com.viewpagerindicator.TabPageIndicator;
import de.danoeh.antennapod.AppConfig; import de.danoeh.antennapod.AppConfig;
import de.danoeh.antennapod.R; import de.danoeh.antennapod.R;
import de.danoeh.antennapod.adapter.SCListAdapter; import de.danoeh.antennapod.adapter.ChapterListAdapter;
import de.danoeh.antennapod.feed.FeedMedia; import de.danoeh.antennapod.feed.FeedMedia;
import de.danoeh.antennapod.feed.SimpleChapter; import de.danoeh.antennapod.feed.SimpleChapter;
import de.danoeh.antennapod.fragment.CoverFragment; import de.danoeh.antennapod.fragment.CoverFragment;
@ -130,7 +130,7 @@ public class AudioplayerActivity extends MediaplayerActivity {
}; };
sCChapterFragment.setListAdapter(new SCListAdapter( sCChapterFragment.setListAdapter(new ChapterListAdapter(
activity, 0, media.getItem() activity, 0, media.getItem()
.getChapters())); .getChapters()));

View File

@ -24,11 +24,11 @@ import de.danoeh.antennapod.feed.Chapter;
import de.danoeh.antennapod.feed.SimpleChapter; import de.danoeh.antennapod.feed.SimpleChapter;
import de.danoeh.antennapod.util.Converter; import de.danoeh.antennapod.util.Converter;
public class SCListAdapter extends ArrayAdapter<Chapter> { public class ChapterListAdapter extends ArrayAdapter<Chapter> {
private static final String TAG = "SCListAdapter"; private static final String TAG = "ChapterListAdapter";
public SCListAdapter(Context context, int textViewResourceId, public ChapterListAdapter(Context context, int textViewResourceId,
List<Chapter> objects) { List<Chapter> objects) {
super(context, textViewResourceId, objects); super(context, textViewResourceId, objects);
} }

View File

@ -923,9 +923,9 @@ public class FeedManager {
do { do {
int chapterType = chapterCursor.getInt(PodDBAdapter.KEY_CHAPTER_TYPE_INDEX); int chapterType = chapterCursor.getInt(PodDBAdapter.KEY_CHAPTER_TYPE_INDEX);
Chapter chapter = null; Chapter chapter = null;
long start = chapterCursor.getLong(PodDBAdapter.KEY_SC_START_INDEX); long start = chapterCursor.getLong(PodDBAdapter.KEY_CHAPTER_START_INDEX);
String title = chapterCursor.getString(PodDBAdapter.KEY_TITLE_INDEX); String title = chapterCursor.getString(PodDBAdapter.KEY_TITLE_INDEX);
String link = chapterCursor.getString(PodDBAdapter.KEY_SC_LINK_INDEX); String link = chapterCursor.getString(PodDBAdapter.KEY_CHAPTER_LINK_INDEX);
switch (chapterType) { switch (chapterType) {
case SimpleChapter.CHAPTERTYPE_SIMPLECHAPTER: case SimpleChapter.CHAPTERTYPE_SIMPLECHAPTER:

View File

@ -74,9 +74,9 @@ public class PodDBAdapter {
public static final int KEY_FEEDITEM_INDEX = 1; public static final int KEY_FEEDITEM_INDEX = 1;
public static final int KEY_QUEUE_FEED_INDEX = 2; public static final int KEY_QUEUE_FEED_INDEX = 2;
// --------- Chapters indices // --------- Chapters indices
public static final int KEY_SC_START_INDEX = 2; public static final int KEY_CHAPTER_START_INDEX = 2;
public static final int KEY_SC_FEEDITEM_INDEX = 3; public static final int KEY_CHAPTER_FEEDITEM_INDEX = 3;
public static final int KEY_SC_LINK_INDEX = 4; public static final int KEY_CHAPTER_LINK_INDEX = 4;
public static final int KEY_CHAPTER_TYPE_INDEX = 5; public static final int KEY_CHAPTER_TYPE_INDEX = 5;
// Key-constants // Key-constants
@ -109,7 +109,7 @@ public class PodDBAdapter {
public static final String KEY_START = "start"; public static final String KEY_START = "start";
public static final String KEY_LANGUAGE = "language"; public static final String KEY_LANGUAGE = "language";
public static final String KEY_AUTHOR = "author"; public static final String KEY_AUTHOR = "author";
public static final String KEY_HAS_SIMPLECHAPTERS = "has_simple_chapters"; public static final String KEY_HAS_CHAPTERS = "has_simple_chapters";
public static final String KEY_TYPE = "type"; public static final String KEY_TYPE = "type";
public static final String KEY_ITEM_IDENTIFIER = "item_identifier"; public static final String KEY_ITEM_IDENTIFIER = "item_identifier";
public static final String KEY_FEED_IDENTIFIER = "feed_identifier"; public static final String KEY_FEED_IDENTIFIER = "feed_identifier";
@ -145,7 +145,7 @@ public class PodDBAdapter {
+ " INTEGER," + KEY_READ + " INTEGER," + KEY_LINK + " TEXT," + " INTEGER," + KEY_READ + " INTEGER," + KEY_LINK + " TEXT,"
+ KEY_DESCRIPTION + " TEXT," + KEY_PAYMENT_LINK + " TEXT," + KEY_DESCRIPTION + " TEXT," + KEY_PAYMENT_LINK + " TEXT,"
+ KEY_MEDIA + " INTEGER," + KEY_FEED + " INTEGER," + KEY_MEDIA + " INTEGER," + KEY_FEED + " INTEGER,"
+ KEY_HAS_SIMPLECHAPTERS + " INTEGER," + KEY_ITEM_IDENTIFIER + KEY_HAS_CHAPTERS + " INTEGER," + KEY_ITEM_IDENTIFIER
+ " TEXT)"; + " TEXT)";
private static final String CREATE_TABLE_FEED_IMAGES = "CREATE TABLE " private static final String CREATE_TABLE_FEED_IMAGES = "CREATE TABLE "
@ -333,7 +333,7 @@ public class PodDBAdapter {
} }
values.put(KEY_FEED, item.getFeed().getId()); values.put(KEY_FEED, item.getFeed().getId());
values.put(KEY_READ, item.isRead()); values.put(KEY_READ, item.isRead());
values.put(KEY_HAS_SIMPLECHAPTERS, item.getChapters() != null); values.put(KEY_HAS_CHAPTERS, item.getChapters() != null);
values.put(KEY_ITEM_IDENTIFIER, item.getItemIdentifier()); values.put(KEY_ITEM_IDENTIFIER, item.getItemIdentifier());
if (item.getId() == 0) { if (item.getId() == 0) {
item.setId(db.insert(TABLE_NAME_FEED_ITEMS, null, values)); item.setId(db.insert(TABLE_NAME_FEED_ITEMS, null, values));