Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
followedReadData.Get();
var bucketToDumpId = followedReadData["followerStatusUpdateBucketId"];
var previousBucketId = followedReadData["previousFollowerStatusUpdateBucketId"];
var newBucketID = createBucket();
followedReadData["followerStatusUpdateBucketId"] = newBucketID;
followedReadData["previousFollowerStatusUpdateBucketId"] = bucketToDumpId;
followedReadData.Update();
var previousBucket = getBucket(previousBucketId)
var bucketToDump = getBucket(bucketToDumpId);
var followersPlayerIds = followedReadData["followers"];
foreach(var entry in previousBucket) {
if(entry.Value == "Follow"){
followersPlayerIds.add(entry.Key);
}
else if(entry.Value == "Unfollow") {
followersPlayerIds.remove(entry.Key);
}
}
foreach(var entry in bucketToDump) {
if(entry.Value == "Follow"){
followersPlayerIds.add(entry.Key);
}
else if(entry.Value == "Unfollow") {
followersPlayerIds.remove(entry.Key);
}
}
followedReadData["followers"] = followersPlayerIds;
deleteBucket(previousBucketId);
followedReadData.Update();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.