Skip to content

Commit cceda35

Browse files
committed
feat(shared-helper): add more strings for actions
1 parent 94d0c0e commit cceda35

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

app/src/main/java/com/edricchan/studybuddy/SharedHelper.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@ public class SharedHelper {
1616
* Intent for notification settings action button for notifications
1717
*/
1818
public static final String ACTION_NOTIFICATIONS_SETTINGS = "com.edricchan.studybuddy.intent.ACTION_NOTIFICATIONS_SETTINGS";
19-
19+
/**
20+
* Action icon for settings
21+
*/
22+
public static final String ACTION_SETTINGS_ICON = "settings";
23+
/**
24+
* Action icon for notification
25+
*/
26+
public static final String ACTION_NOTIFICATION_ICON = "notification";
27+
/**
28+
* Action icon for mark as done
29+
*/
30+
public static final String ACTION_MARK_AS_DONE_ICON = "mark_as_done";
2031
private Context mContext;
2132

2233
public SharedHelper(Context context) {
@@ -30,7 +41,7 @@ public SharedHelper(Context context) {
3041
*/
3142
private List<NotificationAction> addDefaultNotificationActions() {
3243
List<NotificationAction> notificationActionList = new ArrayList<>();
33-
notificationActionList.add(new NotificationAction("Configure notifications", ACTION_NOTIFICATIONS_SETTINGS));
44+
notificationActionList.add(new NotificationAction("settings", "Configure notifications", ACTION_NOTIFICATIONS_SETTINGS));
3445
return notificationActionList;
3546
}
3647

app/src/main/java/com/edricchan/studybuddy/interfaces/NotificationAction.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@
33
public class NotificationAction {
44
private String mAction;
55
private String mActionType;
6-
public NotificationAction(String action, String actionType) {
6+
private String mActionIcon;
7+
8+
public NotificationAction() {
9+
10+
}
11+
public NotificationAction(String action, String actionType, String actionIcon) {
712
this.mAction = action;
813
this.mActionType = actionType;
14+
this.mActionIcon = actionIcon;
915
}
16+
1017
public String getAction() {
1118
return this.mAction;
1219
}
20+
21+
public String getActionIcon() {
22+
return this.mActionIcon;
23+
}
24+
1325
public String getActionType() {
1426
return this.mActionType;
1527
}

0 commit comments

Comments
 (0)