mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Optimize import;
Add sentry import; Keep test code commented.
This commit is contained in:
parent
fd25a41a11
commit
2ce346a276
1 changed files with 23 additions and 2 deletions
|
@ -36,8 +36,6 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import io.sentry.Sentry;
|
||||
|
||||
import static net.foucry.pilldroid.UtilDate.date2String;
|
||||
import static net.foucry.pilldroid.Utils.intRandomExclusive;
|
||||
|
||||
|
@ -377,9 +375,31 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
Intent intent = new Intent(context, DrugDetailActivity.class);
|
||||
intent.putExtra("drug", aDrug);
|
||||
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); // todo deprecated
|
||||
//openActivityForResult(intent);
|
||||
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
|
||||
}
|
||||
|
||||
/* void openActivityForResult(Intent intent) {
|
||||
// Intent intent = new Intent(this,DrugDetailActivity.class);
|
||||
DrugDetailActivityLaucher.launch(intent);
|
||||
}
|
||||
|
||||
ActivityResultLauncher<Intent> DrugDetailActivityLaucher = registerForActivityResult(
|
||||
new ActivityResultContracts.StartActivityForResult(),
|
||||
new ActivityResultCallback<ActivityResult>() {
|
||||
@Override
|
||||
public void onActivityResult(ActivityResult result) {
|
||||
if (result.getResultCode() == Activity.RESULT_OK) {
|
||||
// Here, no request code
|
||||
try {
|
||||
result.getData();
|
||||
Intent data = result.getData();
|
||||
Log.d(TAG, "Result data = " +data.getDataString());
|
||||
}
|
||||
catch (Exception ignored){};
|
||||
}
|
||||
}
|
||||
});*/
|
||||
/**
|
||||
* setupRecyclerView (list of drugs
|
||||
* @param recyclerView RecyclerView
|
||||
|
@ -474,6 +494,7 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
Intent intent = new Intent(context, DrugDetailActivity.class);
|
||||
intent.putExtra("drug", drugCourant);
|
||||
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); // todo: deprecated
|
||||
//openActivityForResult(intent);
|
||||
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue