Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions app/schemas/org.hackillinois.android.database.Database/3.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"formatVersion": 1,
"database": {
"version": 3,
"identityHash": "64145a0d233925fd28a80a38316cd145",
"identityHash": "f39906469f336ff1fd8c3c6c6f1907a4",
"entities": [
{
"tableName": "qr_codes",
Expand Down Expand Up @@ -250,7 +250,7 @@
},
{
"tableName": "profiles",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` TEXT NOT NULL, `displayName` TEXT NOT NULL, `discordTag` TEXT NOT NULL, `avatarUrl` TEXT NOT NULL, `points` INTEGER NOT NULL, `userId` TEXT NOT NULL, `foodWave` INTEGER NOT NULL, `coins` INTEGER NOT NULL, `key` INTEGER NOT NULL, PRIMARY KEY(`key`))",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` TEXT NOT NULL, `userId` TEXT NOT NULL, `avatrUrl` TEXT NOT NULL, `discordTag` TEXT NOT NULL, `displayName` TEXT NOT NULL, `foodWave` INTEGER NOT NULL, `points` INTEGER NOT NULL, `pointsAccumulated` INTEGER NOT NULL, `key` INTEGER NOT NULL, PRIMARY KEY(`key`))",
"fields": [
{
"fieldPath": "_id",
Expand All @@ -259,32 +259,26 @@
"notNull": true
},
{
"fieldPath": "displayName",
"columnName": "displayName",
"fieldPath": "userId",
"columnName": "userId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "discordTag",
"columnName": "discordTag",
"fieldPath": "avatrUrl",
"columnName": "avatrUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "avatarUrl",
"columnName": "avatarUrl",
"fieldPath": "discordTag",
"columnName": "discordTag",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "points",
"columnName": "points",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "userId",
"columnName": "userId",
"fieldPath": "displayName",
"columnName": "displayName",
"affinity": "TEXT",
"notNull": true
},
Expand All @@ -295,8 +289,14 @@
"notNull": true
},
{
"fieldPath": "coins",
"columnName": "coins",
"fieldPath": "points",
"columnName": "points",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "pointsAccumulated",
"columnName": "pointsAccumulated",
"affinity": "INTEGER",
"notNull": true
},
Expand Down Expand Up @@ -458,7 +458,7 @@
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '64145a0d233925fd28a80a38316cd145')"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'f39906469f336ff1fd8c3c6c6f1907a4')"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import org.hackillinois.android.database.entity.*
Shift::class,
ShopItem::class,
],
version = 3,
version = 4,
)

abstract class Database : RoomDatabase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import org.hackillinois.android.database.Converters
@TypeConverters(Converters::class)
data class Profile(
var _id: String,
var displayName: String,
var discordTag: String,
var avatarUrl: String,
var points: Int,
var userId: String,
var avatarUrl: String,
var discordTag: String,
var displayName: String,
var foodWave: Int,
var coins: Int,
var points: Int,
var pointsAccumulated: Int
) {
@PrimaryKey
var key = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ProfileFragment : Fragment() {
avatarImage = view.findViewById(R.id.avatarImage)
waveText = view.findViewById(R.id.waveText)
attendeeTypeText = view.findViewById(R.id.attendeeTypeText)
rankingPlacementText = view.findViewById(R.id.rankingPlacementTextView)
rankingPlacementText = view.findViewById(R.id.rankValue)

// Displays the logout button in the top-right corner if an attendee
val logoutButton = view.findViewById<ImageButton>(R.id.logoutButton)
Expand All @@ -146,6 +146,7 @@ class ProfileFragment : Fragment() {
updateProTag()

// load avatar image png from API using Glide
Log.d("avatarUrl: ", "" + avatarImage)
Glide.with(requireContext()).load(it.avatarUrl).into(avatarImage)
}

Expand Down Expand Up @@ -184,7 +185,7 @@ class ProfileFragment : Fragment() {
multiFormatWriter.encode(text, BarcodeFormat.QR_CODE, width, height, hints)

val clear = Color.TRANSPARENT
val solid = Color.parseColor("#662B13")
val solid = Color.parseColor("#000000")
// creates qr code based on bitMatrix
for (x in 0 until width) {
for (y in 0 until (height)) {
Expand All @@ -205,7 +206,7 @@ class ProfileFragment : Fragment() {
private fun isStaff(): Boolean {
val context = requireActivity().applicationContext
val prefString = context.getString(R.string.authorization_pref_file_key)
return context.getSharedPreferences(prefString, Context.MODE_PRIVATE).getString("provider", "") ?: "" == "google"
return (context.getSharedPreferences(prefString, Context.MODE_PRIVATE).getString("provider", "") ?: "") == "google"
}

private fun isAttendee(): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class ShopFragment : Fragment() {

private fun updateCoinTotalUI(newProfile: Profile?) {
if (newProfile != null) {
coin_total_textview.text = String.format("%,d", newProfile.coins)
coin_total_textview.text = String.format("%,d", newProfile.pointsAccumulated)
}
}

Expand Down
Binary file added app/src/main/res/drawable/blue_stand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/ellipse_profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/fire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/greek_squares.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_logout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
android:viewportHeight="30">
<path
android:pathData="M21.25,10L19.4875,11.7625L21.4625,13.75H11.25V16.25H21.4625L19.4875,18.225L21.25,20L26.25,15L21.25,10ZM6.25,6.25H15V3.75H6.25C4.875,3.75 3.75,4.875 3.75,6.25V23.75C3.75,25.125 4.875,26.25 6.25,26.25H15V23.75H6.25V6.25Z"
android:fillColor="@color/palePeach"/>
android:fillColor="@color/black"/>
</vector>
Binary file added app/src/main/res/drawable/inside_flame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/left_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/olympus_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/profile_avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/rank_frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/right_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/rounded_pink_bg.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/mediumPink" />
<corners android:radius="30dp"/>
<solid android:color="@color/transparentAqua"/>
<corners android:radius="8dp"/>
</shape>
Loading