Skip to content

Commit

Permalink
fixed bug where interests duplicated
Browse files Browse the repository at this point in the history
  • Loading branch information
hettysymes committed Jun 19, 2023
1 parent 358bb3c commit ac93a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/com/example/drp25/MatchActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class MatchActivity : AppCompatActivity() {
val sharedInterests = mutableListOf<String>()

/* Generates TextViews for each interest. */
interestsTable.removeAllViews()
for (interest in snapshot.child("interests").children) {
if (interest.key?.let { usSnapshot.hasChild(it) } == true) {
// This interest is shared
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/example/drp25/UserProfileActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class UserProfileActivity : AppCompatActivity() {
}
})

binding.interestsTable.removeAllViews()
for (interest in snapshot.child("interests").children) {
val inflater = LayoutInflater.from(this@UserProfileActivity)
val rowView = inflater.inflate(R.layout.profile_interest, binding.interestsTable, false) as TableRow
Expand Down

0 comments on commit ac93a80

Please sign in to comment.