Member an DB angepasst
This commit is contained in:
		@@ -748,7 +748,7 @@ public class Dash extends AppCompatActivity implements ShoppinglistAdapter.OnIte
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    TabHost tabhost = (TabHost) findViewById(R.id.tabHost1);
 | 
			
		||||
                    tabhost.setCurrentTab(1);
 | 
			
		||||
                    tabhost.setCurrentTab(0);
 | 
			
		||||
                    sharedswiperefresh.setRefreshing(true);
 | 
			
		||||
 | 
			
		||||
                    showSharedShoppingList(FirebaseAuth.getInstance().getCurrentUser().getUid());
 | 
			
		||||
 
 | 
			
		||||
@@ -98,7 +98,7 @@ public class Database {
 | 
			
		||||
    public Member getAdmin(String sl_id) throws SQLException, JSONException {
 | 
			
		||||
        String SQL = "SELECT row_to_json(\"User\") as obj FROM \"User\" JOIN \"Shoppinglist_admin\" USING (username) WHERE sl_id = ?";
 | 
			
		||||
        JSONObject jsonObject = new JSONObject(executeQuery(SQL, sl_id));
 | 
			
		||||
        return new Member(jsonObject.getString("username"), jsonObject.getString("message_id"));
 | 
			
		||||
        return new Member(jsonObject.getString("username"), jsonObject.getString("message_id"), jsonObject.getString("name"), jsonObject.getString("picture"), jsonObject.getString("email"));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -113,7 +113,7 @@ public class Database {
 | 
			
		||||
        List<JSONObject> jsonObjects = executeQueryJSONObject(SQL, sl_id);
 | 
			
		||||
        for(int i = 0; i < jsonObjects.size(); i++){
 | 
			
		||||
            JSONObject jsonObject = jsonObjects.get(i);
 | 
			
		||||
            members.add(new Member(jsonObject.getString("username"), jsonObject.getString("message_id")));
 | 
			
		||||
            members.add(new Member(jsonObject.getString("username"), jsonObject.getString("message_id"), jsonObject.getString("name"), jsonObject.getString("picture"), jsonObject.getString("email")));
 | 
			
		||||
        }
 | 
			
		||||
        return members;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,26 @@
 | 
			
		||||
package at.smartshopper.smartshopper.shoppinglist;
 | 
			
		||||
 | 
			
		||||
public class Member {
 | 
			
		||||
    private String uid, msid;
 | 
			
		||||
    private String uid, msid, name, pic, email;
 | 
			
		||||
 | 
			
		||||
    public Member(String uid, String msid){
 | 
			
		||||
    public Member(String uid, String msid, String name, String pic, String email){
 | 
			
		||||
        this.uid = uid;
 | 
			
		||||
        this.msid = msid;
 | 
			
		||||
        this.name = name;
 | 
			
		||||
        this.pic = pic;
 | 
			
		||||
        this.email = email;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getName() {
 | 
			
		||||
        return name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getPic() {
 | 
			
		||||
        return pic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getEmail() {
 | 
			
		||||
        return email;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getUid() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user