mirror of
https://github.com/nextcloud/android.git
synced 2024-11-30 08:25:21 +03:00
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
4dc092945b
commit
352dbd575c
1 changed files with 14 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue