From 475483ae6b92ee864e624c62ba809c84941eddef Mon Sep 17 00:00:00 2001 From: "maxime.zammit" Date: Fri, 15 Apr 2022 22:28:21 +0200 Subject: [PATCH 1/7] doing debug --- .../activity/AuthenticationActivity.kt | 1 + .../sdp/vibester/activity/ProfileActivity.kt | 20 +++++++++++++++---- .../sdp/vibester/activity/WelcomeActivity.kt | 13 ++++++++++-- .../ch/sdp/vibester/database/UsersRepo.kt | 6 +++++- .../ch/sdp/vibester/model/UserSharedPref.kt | 1 + 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt b/app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt index c94312a2a..e136a86df 100644 --- a/app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt +++ b/app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt @@ -10,6 +10,7 @@ import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import ch.sdp.vibester.R import ch.sdp.vibester.auth.FireBaseAuthenticator +import ch.sdp.vibester.model.UserSharedPref import com.google.android.gms.auth.api.signin.GoogleSignIn import com.google.android.gms.auth.api.signin.GoogleSignInClient import com.google.android.gms.auth.api.signin.GoogleSignInOptions diff --git a/app/src/main/java/ch/sdp/vibester/activity/ProfileActivity.kt b/app/src/main/java/ch/sdp/vibester/activity/ProfileActivity.kt index 0a2bfd309..62375ceae 100644 --- a/app/src/main/java/ch/sdp/vibester/activity/ProfileActivity.kt +++ b/app/src/main/java/ch/sdp/vibester/activity/ProfileActivity.kt @@ -1,7 +1,9 @@ package ch.sdp.vibester.activity +import android.graphics.Bitmap import android.os.Bundle import android.text.InputType +import android.util.Log import android.view.Window import android.widget.Button import android.widget.EditText @@ -19,6 +21,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.async import kotlinx.coroutines.launch +import java.util.concurrent.TimeUnit import javax.inject.Inject @AndroidEntryPoint @@ -35,7 +38,7 @@ class ProfileActivity : AppCompatActivity() { setContentView(R.layout.activity_profile) - setupProfile(UserSharedPref.getUser(this)) + setupProfile(UserSharedPref.getUser(applicationContext)) val editUsername = findViewById