aboutsummaryrefslogtreecommitdiffstats
path: root/Resources/friendship/ui/LikeList.js
diff options
context:
space:
mode:
authorAnqi Xu2012-06-24 12:45:05 -0400
committerAnqi Xu2012-06-24 12:45:05 -0400
commit1a9c58f10c98565124141840a61a34494f4d4579 (patch)
treee826e48c78367f0fe3678075516c5ecae57a403f /Resources/friendship/ui/LikeList.js
parente06955279665f5ead6414c2f23485997e77dbad9 (diff)
parent3c1f3dc92d5ffad081afc560f24d0610f64d60bf (diff)
downloadLikeFeed-1a9c58f10c98565124141840a61a34494f4d4579.tar.bz2
Merge branch 'master' of github.com:teddywing/LikeFeed
Conflicts: tiapp.xml
Diffstat (limited to 'Resources/friendship/ui/LikeList.js')
-rw-r--r--Resources/friendship/ui/LikeList.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js
index d70af54..f46ba55 100644
--- a/Resources/friendship/ui/LikeList.js
+++ b/Resources/friendship/ui/LikeList.js
@@ -58,7 +58,9 @@
function create_row( key )
{
// Reason for Factory: templating format of the row
- var row = Ti.UI.createTableViewRow();
+ var row = Ti.UI.createTableViewRow(/*{
+ hasChild: true // messes up the layout currently. Try later.
+ }*/);
row.addEventListener('click', function(e) {
Ti.UI.currentTabGroup.activeTab.open(fs.ui.createWebViewWin({
@@ -205,14 +207,9 @@
//Ti.App.fireEvent('app:show.loader');
Ti.API.addEventListener("processFriendIDs", function(e) {
- Ti.API.info(e.data);
fs.data.friends = Array();
for (var i = 0; i < e.data.length; i++) {
- fs.data.friends[e.data[i].uid.toString()] = {uid: e.data[i].uid, pic: e.data[i].pic_square, name: e.data[i].name};
- }
-
- for (key in fs.data.friends) {
- Ti.API.info(key + ": " + fs.data.friends[key].name);
+ fs.data.friends[e.data[i].uid.toString()] = {uid: e.data[i].uid, pic: e.data[i].pic_square, name: e.data[i].name, selected: true};
}
fs.core.queryAllFriendLikeIDsFQL();
@@ -300,10 +297,17 @@
return ll_view;
};
- fs.ui.refreshLikeList = function(e) {
+ fs.ui.refreshAllFriendsLikeList = function(e) {
+ if (Ti.Facebook.loggedIn) {
+ Ti.App.fireEvent('app:show.loader');
+ fs.core.queryFriendIDsFQL();
+ }
+ };
+
+ fs.ui.refreshLikeList = function(friend_ids) {
if (Ti.Facebook.loggedIn) {
Ti.App.fireEvent('app:show.loader');
- fs.core.queryAllFriendLikeIDsFQL(); // TODO: switch to friend_ids version of query
+ fs.core.queryLikeIDsFQL(friend_ids);
}
};
})();