r7440 - dumbhippo/trunk/server/src/com/dumbhippo/server/blocks



Author: marinaz
Date: 2008-04-18 16:00:48 -0500 (Fri, 18 Apr 2008)
New Revision: 7440

Modified:
   dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/FacebookBlockView.java
Log:
Use getTextForSelf() if the viewpoint is a SystemViewpoint in FacebookBlockView.

Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/FacebookBlockView.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/FacebookBlockView.java	2008-04-18 20:59:45 UTC (rev 7439)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/blocks/FacebookBlockView.java	2008-04-18 21:00:48 UTC (rev 7440)
@@ -12,6 +12,7 @@
 import com.dumbhippo.persistence.GroupBlockData;
 import com.dumbhippo.persistence.UserBlockData;
 import com.dumbhippo.server.views.PersonView;
+import com.dumbhippo.server.views.SystemViewpoint;
 import com.dumbhippo.server.views.Viewpoint;
 import com.dumbhippo.services.FacebookPhotoData;
 import com.dumbhippo.services.FacebookPhotoDataView;
@@ -171,7 +172,10 @@
 	}
 
 	public String getTitle() {
-		if (getViewpoint().isOfUser(getPersonSource().getUser()))
+		// right now we can (and need to) return getTextForSelf() for the SystemViewpoint because we only display 
+		// Facebook blocks to self, the blocks would all need to have generic text if SystemViewpoint
+		// is passed in in the future for someone other than the block owner
+		if (getViewpoint().isOfUser(getPersonSource().getUser()) || (getViewpoint() instanceof SystemViewpoint))
 			return getTextForSelf();
 		else 		
 			return getGenericText();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]