Loading src/com/android/gallery3d/filtershow/HistoryAdapter.java +2 −18 Original line number Diff line number Diff line Loading @@ -133,22 +133,9 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> { } public void addHistoryItem(ImagePreset preset) { if (canAddHistoryItem(preset)) { insert(preset, 0); updateMenuItems(); } } public boolean canAddHistoryItem(ImagePreset preset) { if (getCount() > 0 && getCurrent().same(preset)) { // we may still want to insert if the previous // history element isn't the same if (getLast().historyName().equalsIgnoreCase(preset.historyName())) { return false; } } return true; } @Override public void insert(ImagePreset preset, int position) { Loading @@ -164,9 +151,6 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> { } mCurrentPresetPosition = position; this.notifyDataSetChanged(); if (!canAddHistoryItem(preset)) { return; } } super.insert(preset, position); mCurrentPresetPosition = position; Loading Loading
src/com/android/gallery3d/filtershow/HistoryAdapter.java +2 −18 Original line number Diff line number Diff line Loading @@ -133,22 +133,9 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> { } public void addHistoryItem(ImagePreset preset) { if (canAddHistoryItem(preset)) { insert(preset, 0); updateMenuItems(); } } public boolean canAddHistoryItem(ImagePreset preset) { if (getCount() > 0 && getCurrent().same(preset)) { // we may still want to insert if the previous // history element isn't the same if (getLast().historyName().equalsIgnoreCase(preset.historyName())) { return false; } } return true; } @Override public void insert(ImagePreset preset, int position) { Loading @@ -164,9 +151,6 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> { } mCurrentPresetPosition = position; this.notifyDataSetChanged(); if (!canAddHistoryItem(preset)) { return; } } super.insert(preset, position); mCurrentPresetPosition = position; Loading