Unverified Commit fe477b75 authored by Aral Balkan's avatar Aral Balkan
Browse files

Also fixed the bug with images not displaying if received via a delta update...

Also fixed the bug with images not displaying if received via a delta update for the All Friends timeline.
parent 6fb503dc
......@@ -12,6 +12,25 @@ function insertAfter(parentNode, referenceNode, newNode) {
parentNode.insertBefore(newNode, nodeToInsertBefore);
function massageAssetURLsInMessages(messages){
// Massage the asset URLs
var massagedMessages = [];
messages.forEach(function (message){
// Replace asset URLs
var personHandleDelimeter = message.key.lastIndexOf('Z-');
if (personHandleDelimeter != -1) {
var personHandle = message.key.substr(personHandleDelimeter+2);
message.value = message.value.replace(new RegExp('/all-friends/to', 'g'), ""+personHandle);
return messages;
function getOlderMessages(){
console.log("Polling server for older public posts (infinite scroll)…")
......@@ -57,6 +76,8 @@ function getOlderMessages(){
posts = massageAssetURLsInMessages(posts);
console.log("Got " + posts.length + "older posts.");
var repeaterNodeInnerHTML =
......@@ -319,6 +340,8 @@ window.addEventListener('load', function(){
posts = massageAssetURLsInMessages(posts);
// Make sure that the notice is hidden and that the main section is showing.
// (Set can’t handle this automatically as we are not running it on the
// entire document but only on the delta repeat block below for performance reasons.)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment