|
@@ -74,6 +74,7 @@ import butterknife.ButterKnife;
|
|
|
*/
|
|
|
public class NotificationListAdapter extends RecyclerView.Adapter<NotificationListAdapter.NotificationViewHolder> {
|
|
|
private static final String FILE = "file";
|
|
|
+ private static final String ACTION_TYPE_WEB = "WEB";
|
|
|
private StyleSpan styleSpanBold = new StyleSpan(Typeface.BOLD);
|
|
|
private ForegroundColorSpan foregroundColorSpanBlack;
|
|
|
|
|
@@ -184,11 +185,19 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
|
|
|
|
|
|
button.setOnClickListener(v -> {
|
|
|
setButtonEnabled(holder, false);
|
|
|
- new NotificationExecuteActionTask(client,
|
|
|
- holder,
|
|
|
- notification,
|
|
|
- notificationsActivity)
|
|
|
- .execute(action);
|
|
|
+
|
|
|
+ if (ACTION_TYPE_WEB.equals(action.type)) {
|
|
|
+ Intent intent = new Intent(Intent.ACTION_VIEW);
|
|
|
+ intent.setData(Uri.parse(action.link));
|
|
|
+
|
|
|
+ notificationsActivity.startActivity(intent);
|
|
|
+ } else {
|
|
|
+ new NotificationExecuteActionTask(client,
|
|
|
+ holder,
|
|
|
+ notification,
|
|
|
+ notificationsActivity)
|
|
|
+ .execute(action);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
holder.buttons.addView(button);
|