Native rewrite #878

Merged
akinwale merged 65 commits from native-rewrite into master 2020-05-23 08:49:00 +02:00
Showing only changes of commit aad718c714 - Show all commits

View file

@ -944,6 +944,9 @@ public class FileViewActivity extends AppCompatActivity {
public void onClick(DialogInterface dialogInterface, int i) {
Bundle bundle = new Bundle();
bundle.putString("uri", currentUrl);
bundle.putBoolean("paid", true);
bundle.putDouble("amount", cost);
bundle.putString("currency", fee.getCurrency());
LbryAnalytics.logEvent(LbryAnalytics.EVENT_PURCHASE_URI, bundle);
findViewById(R.id.file_view_main_action_button).setVisibility(View.INVISIBLE);
@ -989,6 +992,13 @@ public class FileViewActivity extends AppCompatActivity {
public void onSuccess(LbryFile file, boolean saveFile) {
// queue the download
if (claim != null) {
if (claim.isFree()) {
// paid is handled differently
Bundle bundle = new Bundle();
bundle.putString("uri", currentUrl);
LbryAnalytics.logEvent(LbryAnalytics.EVENT_PURCHASE_URI, bundle);
}
if (!claim.isPlayable()) {
logFileView(claim.getPermanentUrl(), 0);
}