go away from path to store
This commit is contained in:
parent
2577862a77
commit
edc74f015d
2 changed files with 12 additions and 8 deletions
|
@ -1,13 +1,15 @@
|
|||
package org.ligi.passandroid.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.view.Menu;
|
||||
|
||||
import org.ligi.axt.AXT;
|
||||
import org.ligi.passandroid.App;
|
||||
import org.ligi.passandroid.R;
|
||||
import org.ligi.passandroid.model.PassStore;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
|
@ -33,10 +35,13 @@ public class TicketImportActivity extends ActionBarActivity {
|
|||
@Override
|
||||
public Void call(String path) {
|
||||
|
||||
Intent i = new Intent(ticketImportActivity, TicketViewActivity.class);
|
||||
i.putExtra("path", path);
|
||||
TicketImportActivity.this.startActivity(i);
|
||||
finish();
|
||||
// TODO this is kind of a hack - there should be a better way
|
||||
final String id = AXT.at(path.split("/")).last();
|
||||
|
||||
final PassStore store = App.getPassStore();
|
||||
store.setCurrentPass(store.getPassbookForId(id));
|
||||
|
||||
AXT.at(TicketImportActivity.this).startCommonIntent().activityFromClass(TicketViewActivity.class);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import android.widget.TextView;
|
|||
|
||||
import org.ligi.axt.AXT;
|
||||
import org.ligi.passandroid.App;
|
||||
import org.ligi.passandroid.FullscreenMapActivity;
|
||||
import org.ligi.passandroid.R;
|
||||
import org.ligi.passandroid.TicketDefinitions;
|
||||
import org.ligi.passandroid.helper.PassVisualizer;
|
||||
|
@ -34,9 +35,7 @@ public class TicketViewActivity extends TicketViewActivityBase {
|
|||
|
||||
@OnClick(R.id.barcode_img)
|
||||
void onBarcodeClick() {
|
||||
Intent i = new Intent(TicketViewActivity.this, FullscreenBarcodeActivity.class);
|
||||
i.putExtra("path", path);
|
||||
TicketViewActivity.this.startActivity(i);
|
||||
AXT.at(this).startCommonIntent().activityFromClass(FullscreenMapActivity.class);
|
||||
}
|
||||
|
||||
@InjectView(R.id.barcode_img)
|
||||
|
|
Loading…
Reference in a new issue