Version 15.127.2

This commit is contained in:
Antonio Cañas Vargas 2016-01-25 12:00:10 +01:00
parent 31664d159f
commit 2c93cbce9a
2 changed files with 11 additions and 2 deletions

View File

@ -121,19 +121,19 @@
// TODO: When receiving a new post, create first the publishing, then the post
// TODO: Change PstCod to PubCod in social_posts, removing AUTO_INCREMENT
// TODO: View highlighted social note when clicking in timeline notification
// TODO: Mark timeline notifications as removed when unfav?
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.127.1 (2016-01-25)"
#define Log_PLATFORM_VERSION "SWAD 15.127.2 (2016-01-25)"
#define CSS_FILE "swad15.121.7.css"
#define JS_FILE "swad15.121.7.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 15.127.2: Jan 25, 2016 Mark timeline notifications as removed when a social note/comment is unfaved. (194838 lines)
Version 15.127.1: Jan 25, 2016 Mark timeline notifications as removed when a social note is unshared. (194831 lines)
Version 15.127: Jan 25, 2016 New function to count the number of @nicknames in a text and store it in social publishing. (194825 lines)
Version 15.126.1: Jan 24, 2016 Optimization in code to insert links. (194736 lines)

View File

@ -3157,6 +3157,7 @@ static long Soc_UnfavSocialNote (void)
extern const char *Txt_The_original_post_no_longer_exists;
struct SocialNote SocNot;
char Query[256];
long PubCod;
/***** Get data of social note *****/
SocNot.NotCod = Soc_GetParamNotCod ();
@ -3180,6 +3181,11 @@ static long Soc_UnfavSocialNote (void)
/***** Update number of times this social note is favourited *****/
SocNot.NumFavs = Soc_GetNumTimesANoteHasBeenFav (&SocNot);
/***** Mark possible notifications on this social note as removed *****/
PubCod = Soc_GetPubCodOfOriginalSocialNote (SocNot.NotCod);
if (PubCod > 0)
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,PubCod);
/***** Show the social note just unfavourited *****/
Soc_WriteSocialNote (&SocNot,
Soc_TOP_MESSAGE_UNFAV,Gbl.Usrs.Me.UsrDat.UsrCod,
@ -3258,6 +3264,9 @@ static long Soc_UnfavSocialComment (void)
/***** Update number of times this social comment is favourited *****/
SocCom.NumFavs = Soc_GetNumTimesACommHasBeenFav (&SocCom);
/***** Mark possible notifications on this social comment as removed *****/
Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_FAV,SocCom.ComCod);
/***** Show the social comment just unfavourited *****/
Soc_WriteSocialComment (&SocCom,
Soc_TOP_MESSAGE_UNFAV,Gbl.Usrs.Me.UsrDat.UsrCod,