Permalink
Browse files

user id fixes

  • Loading branch information...
1 parent e1fe100 commit eaba928c0badea2343633282709e2b090024fc3a @esconie committed Apr 25, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/Shopaholix/database/Backend.java
View
8 src/Shopaholix/database/Backend.java
@@ -49,21 +49,18 @@ public Backend() {
me = new User("Personal");
users = new HashMap<String,User>();
+ users.put("Personal", me);
allTags = new HashSet<Tag>();
String[] upcs = { "037000188421", "037000230113", "037000188438",
"037000185055", "037000185208" };
for (String upc : upcs) {
getItem(upc);
}
- User haoyi = new User("Haoyi");
- //addFamilyMember(haoyi,"HAOYI@SHOPAHOLIX");
rateItem(upcs[0], Rating.GOOD);
rateItem(upcs[1], Rating.GOOD);
rateItem(upcs[3], Rating.NEUTRAL);
rateItem(upcs[4], Rating.BAD);
- rateFamilyItem(upcs[0], haoyi, Rating.GOOD);
- rateFamilyItem(upcs[1], haoyi, Rating.BAD);
}
public ArrayList<Item> getSuggestedItems(String s) {
@@ -84,7 +81,7 @@ public void setContext(Context c) {
}catch(Exception e){
String id = "id" + new Random().nextInt();
- //users.put(id,me);
+ users.put(id,me);
ID = id;
}
@@ -293,7 +290,6 @@ public void rateItem(String UPC, Rating rating) {
items.get(UPC).ratings.put(me, rating);
new ServerUpdate().execute(updateString);
new ServerConnect().execute(lastTime);
-
}
public void rateFamilyItem(String UPC, User user, Rating rating) {

0 comments on commit eaba928

Please sign in to comment.