mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 22:09:30 +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,
|
USER_PAGE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On a group page
|
||||||
|
*/
|
||||||
|
GROUP_PAGE,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On a comment
|
* On a comment
|
||||||
*/
|
*/
|
||||||
|
@ -195,6 +195,9 @@ public class NotificationsHelper {
|
|||||||
case "user_page":
|
case "user_page":
|
||||||
return NotifElemType.USER_PAGE;
|
return NotifElemType.USER_PAGE;
|
||||||
|
|
||||||
|
case "group_page":
|
||||||
|
return NotifElemType.GROUP_PAGE;
|
||||||
|
|
||||||
case "conversation":
|
case "conversation":
|
||||||
return NotifElemType.CONVERSATION;
|
return NotifElemType.CONVERSATION;
|
||||||
|
|
||||||
|
@ -61,6 +61,7 @@ public class NotifsUtils {
|
|||||||
|
|
||||||
|
|
||||||
//Notification target
|
//Notification target
|
||||||
|
//User page
|
||||||
if(notif.getFrom_container_type() == NotifElemType.USER_PAGE){
|
if(notif.getFrom_container_type() == NotifElemType.USER_PAGE){
|
||||||
|
|
||||||
if(notif.getFrom_user_id() == notif.getFrom_container_id())
|
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 the message
|
||||||
return message;
|
return message;
|
||||||
|
|
||||||
|
@ -200,4 +200,5 @@
|
|||||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||||
<string name="action_personal_page">My Page</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>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user