- // TODO put something smart in the contentIntent below\r
- finalNotification.contentIntent = PendingIntent.getActivity(getApplicationContext(), (int)System.currentTimeMillis(), new Intent(), 0);\r
+ Intent showDetailsIntent = null;\r
+ if (downloadResult.isSuccess()) {\r
+ if (PreviewImageFragment.canBePreviewed(download.getFile())) {\r
+ showDetailsIntent = new Intent(this, PreviewImageActivity.class);\r
+ } else {\r
+ showDetailsIntent = new Intent(this, FileDetailActivity.class);\r
+ }\r
+ showDetailsIntent.putExtra(FileDetailFragment.EXTRA_FILE, download.getFile());\r
+ showDetailsIntent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, download.getAccount());\r
+ showDetailsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r
+ \r
+ } else {\r
+ // TODO put something smart in showDetailsIntent\r
+ showDetailsIntent = new Intent();\r
+ }\r
+ finalNotification.contentIntent = PendingIntent.getActivity(getApplicationContext(), (int)System.currentTimeMillis(), showDetailsIntent, 0);\r