mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-12-26 13:38:59 +00:00
Ready to implement groups support in notification system.
This commit is contained in:
parent
78aadd55a1
commit
2f4621c0e5
@ -29,6 +29,11 @@ public enum NotifElemType {
|
||||
*/
|
||||
USER_PAGE,
|
||||
|
||||
/**
|
||||
* On a group page
|
||||
*/
|
||||
GROUP_PAGE,
|
||||
|
||||
/**
|
||||
* On a comment
|
||||
*/
|
||||
|
@ -195,6 +195,9 @@ public class NotificationsHelper {
|
||||
case "user_page":
|
||||
return NotifElemType.USER_PAGE;
|
||||
|
||||
case "group_page":
|
||||
return NotifElemType.GROUP_PAGE;
|
||||
|
||||
case "conversation":
|
||||
return NotifElemType.CONVERSATION;
|
||||
|
||||
|
@ -61,6 +61,7 @@ public class NotifsUtils {
|
||||
|
||||
|
||||
//Notification target
|
||||
//User page
|
||||
if(notif.getFrom_container_type() == NotifElemType.USER_PAGE){
|
||||
|
||||
if(notif.getFrom_user_id() == notif.getFrom_container_id())
|
||||
@ -71,6 +72,11 @@ public class NotifsUtils {
|
||||
|
||||
}
|
||||
|
||||
//Group page
|
||||
else if(notif.getFrom_container_type() == NotifElemType.GROUP_PAGE){
|
||||
message += UiUtils.getString(context, R.string.notif_on_group_page);
|
||||
}
|
||||
|
||||
//Return the message
|
||||
return message;
|
||||
|
||||
|
@ -200,4 +200,5 @@
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="action_personal_page">My Page</string>
|
||||
<string name="notif_on_group_page">on the page of the group %1$s</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user