Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fms-byte committed May 10, 2024
2 parents 1bd9f0d + a3104d7 commit cdd2e60
Show file tree
Hide file tree
Showing 77 changed files with 1,560 additions and 255 deletions.
7 changes: 4 additions & 3 deletions android-app/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_logo"
android:icon="@drawable/logo_round"
android:label="@string/app_name"
android:largeHeap="true"
android:requestLegacyExternalStorage="true"
android:roundIcon="@drawable/ic_logo"
android:roundIcon="@drawable/logo_round"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:theme="@style/AppTheme"
Expand Down Expand Up @@ -66,6 +66,7 @@
</activity>
<activity android:name="com.quantum_guys.dncc_eco_sync.ui.activities.quiz.ResultActivity" />
<activity android:name="com.quantum_guys.dncc_eco_sync.ui.activities.post.WhoLikedActivity" />
<activity android:name="com.quantum_guys.dncc_eco_sync.ui.activities.MapView" />
<activity android:name="com.quantum_guys.dncc_eco_sync.ui.activities.post.PostText" />
<activity android:name="com.quantum_guys.dncc_eco_sync.messege.activity.MessageActivity" />
<activity android:name="com.quantum_guys.dncc_eco_sync.ui.activities.post.PostImage" />
Expand Down Expand Up @@ -102,7 +103,7 @@
<!-- ca-app-pub-1812307912459750~8721341741-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_logo_icon" />
android:resource="@drawable/logo_round" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccentt" />
Expand Down
2 changes: 1 addition & 1 deletion android-app/app/src/main/assets/video_loading_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
holder.name.setText(usersList.get(position).getName());

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo_icon))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(usersList.get(position).getImage())
.into(holder.image);

Expand Down Expand Up @@ -109,7 +109,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
holder.name.setText(documentSnapshot.getString("name"));

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(holder.image);

Expand Down Expand Up @@ -155,7 +155,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {


Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo_icon))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(holder.image);

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
Notification notification = notificationsList.get(position);

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(notification.getImage())
.into(holder.image);

Expand Down Expand Up @@ -122,7 +122,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
holder.type_image.setImageResource(R.drawable.ic_image_post_black);
break;
default:
holder.type_image.setImageResource(R.drawable.ic_logo);
holder.type_image.setImageResource(R.drawable.logo_round);
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
int score = (int) users.getScore();
holder.level.setText(String.valueOf(getLevelNum(score)));
Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(users.getImage())
.into(holder.image);
final String userid = users.getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public void run() {
user_name.setText(documentSnapshot.getString("name"));

Glide.with(Home.context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(user_image);
} else if (!Objects.equals(documentSnapshot.getString("userId"), post.getUserId())) {
Expand All @@ -493,14 +493,13 @@ public void run() {
Map<String, Object> postMap = new HashMap<>();
postMap.put("userimage", documentSnapshot.getString("image"));

postDb
.document(post.getPostId())
postDb.document(post.getPostId())
.update(postMap)
.addOnSuccessListener(aVoid -> Log.i("post_update", "success"))
.addOnFailureListener(e -> Log.i("post_update", "failure"));

Glide.with(Home.context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(user_image);

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, @SuppressLint("Re
holder.name.setText(usersList.get(position).getName());

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(usersList.get(position).getImage())
.into(holder.image);

Expand Down Expand Up @@ -112,7 +112,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, @SuppressLint("Re
holder.name.setText(documentSnapshot.getString("name"));

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(holder.image);

Expand Down Expand Up @@ -148,7 +148,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, @SuppressLint("Re


Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(holder.image);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {

try {
Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(friends.getImage())
.into(holder.image);
} catch (NullPointerException ignored) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void onBindViewHolder(final ViewHolder holder, final int position) {
// holder.institute.setText(usersList.get(position).getDept()+", "+usersList.get(position).getInstitute());

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo_icon))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(usersList.get(position).getImage())
.into(holder.image);

Expand Down Expand Up @@ -123,7 +123,7 @@ public void onBindViewHolder(final ViewHolder holder, final int position) {
holder.institute.setText(usersList.get(position).getDept() + ", " + usersList.get(position).getInstitute());

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo_icon))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(holder.image);

Expand Down Expand Up @@ -165,7 +165,7 @@ public void onBindViewHolder(final ViewHolder holder, final int position) {
holder.name.setText(documentSnapshot.getString("name"));

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo_icon))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(holder.image);

Expand All @@ -188,7 +188,7 @@ public void onBindViewHolder(final ViewHolder holder, final int position) {
holder.institute.setText(usersList.get(position).getDept() + ", " + usersList.get(position).getInstitute());

Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo_icon))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(holder.image);

Expand Down Expand Up @@ -224,7 +224,7 @@ public void onBindViewHolder(final ViewHolder holder, final int position) {


Glide.with(context)
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.ic_logo_icon))
.setDefaultRequestOptions(new RequestOptions().placeholder(R.drawable.logo_round))
.load(documentSnapshot.getString("image"))
.into(holder.image);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
final Users user = mUsers.get(position);
holder.username.setText(user.getName());
if (user.getImage().equals("default")) {
holder.profile_image.setImageResource(R.drawable.ic_logo);
holder.profile_image.setImageResource(R.drawable.logo_round);
} else {
try {
Glide.with(mContext).load(user.getImage()).placeholder(R.drawable.ic_logo).into(holder.profile_image);
Glide.with(mContext).load(user.getImage()).placeholder(R.drawable.logo_round).into(holder.profile_image);
} catch (ArrayIndexOutOfBoundsException ignored) {
holder.profile_image.setImageDrawable(mContext.getDrawable(R.drawable.ic_logo));
holder.profile_image.setImageDrawable(mContext.getDrawable(R.drawable.logo_round));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ public void onTextChanged(CharSequence s, int start,
try {
username.setText(name);
if (Objects.equals(image, "")) {
profile_image.setImageResource(R.drawable.ic_logo);
profile_image.setImageResource(R.drawable.logo_round);
} else {
try {
Glide.with(getApplicationContext()).load(image).placeholder(R.drawable.ic_logo).into(profile_image);
Glide.with(getApplicationContext()).load(image).placeholder(R.drawable.logo_round).into(profile_image);
} catch (ArrayIndexOutOfBoundsException ignored) {
profile_image.setImageDrawable(getResources().getDrawable(R.drawable.ic_logo));
profile_image.setImageDrawable(getResources().getDrawable(R.drawable.logo_round));
}
}
readMesagges(fuser, userid, image);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package com.quantum_guys.dncc_eco_sync.models;

public class Issue extends Post{

String states = "Pending"; // Pending, Resolved, Processing
String issueType; //

boolean isAnonymous;

float lat, lon;
String address;


public Issue(String postId, String userId, String name, String timestamp, String likes, String favourites, String description, String username, String institute, String dept, String userimage, int image_count, String image_url_0, String image_url_1, String image_url_2, String image_url_3, String image_url_4, String image_url_5, String image_url_6, int liked_count, int comment_count, String states, String issueType, boolean isAnonymous, float lat, float lon, String address) {
super(postId, userId, name, timestamp, likes, favourites, description, username, institute, dept, userimage, image_count, image_url_0, image_url_1, image_url_2, image_url_3, image_url_4, image_url_5, image_url_6, liked_count, comment_count);
this.states = states;
this.issueType = issueType;
this.isAnonymous = isAnonymous;
this.lat = lat;
this.lon = lon;
this.address = address;
}

public String getStates() {
return states;
}

public void setStates(String states) {
this.states = states;
}

public String getIssueType() {
return issueType;
}

public void setIssueType(String issueType) {
this.issueType = issueType;
}

public boolean isAnonymous() {
return isAnonymous;
}

public void setAnonymous(boolean anonymous) {
isAnonymous = anonymous;
}

public float getLat() {
return lat;
}

public void setLat(float lat) {
this.lat = lat;
}

public float getLon() {
return lon;
}

public void setLon(float lon) {
this.lon = lon;
}

public String getAddress() {
return address;
}

public void setAddress(String address) {
this.address = address;
}
}
Loading

0 comments on commit cdd2e60

Please sign in to comment.