unify with method

This commit is contained in:
ligi 2014-03-30 17:01:25 +05:30
parent 0e9758ca2e
commit 413648ded8

View file

@ -186,12 +186,16 @@ public class TicketListActivity extends ActionBarActivity {
@Override
public void onRefresh() {
Tracker.get().trackEvent(TrackerInterface.EVENT_CATEGORY_UI_ACTION, "refresh", "from_swipe", null);
App.getPassStore().deleteCache();
new ScanForPassesTask().execute();
scanForPasses();
}
});
}
private void scanForPasses() {
App.getPassStore().deleteCache();
new ScanForPassesTask().execute();
}
private void scrollToType(String type) {
for (int i = 0; i < passadapter.getCount(); i++) {
if (App.getPassStore().getReducedPassbookAt(i).getTypeNotNull().equals(type)) {
@ -212,7 +216,7 @@ public class TicketListActivity extends ActionBarActivity {
switch (item.getItemId()) {
case R.id.menu_refresh:
Tracker.get().trackEvent(TrackerInterface.EVENT_CATEGORY_UI_ACTION, "refresh", "from_optionsitem", null);
new ScanForPassesTask().execute();
scanForPasses();
return true;
case R.id.menu_help:
Intent intent = new Intent(this, HelpActivity.class);