Skip to content

Commit

Permalink
Merge pull request #252 from PermanentOrg/bugfix/VSP-1340-Fix-login-i…
Browse files Browse the repository at this point in the history
…ssue

Fix login issue
  • Loading branch information
flaviuvsp authored Feb 6, 2024
2 parents 87d052d + 687277b commit a4ce5bf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deployRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release to Play store
on:
workflow_dispatch:
push:
branches: [ "release-disabled/**" ]
branches: [ "release/**" ]

jobs:
build:
Expand Down Expand Up @@ -52,12 +52,13 @@ jobs:
KEYSTORE_FILE: '${{ github.workspace }}/permanent.keystore'
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
MIXPANEL_KEY: ${{ secrets.MIXPANEL_KEY }}
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}
run: |
touch local.properties
echo GMP_KEY="$GMP_KEY" >> local.properties
echo AUTH_CLIENT_ID="$AUTH_CLIENT_ID" >> local.properties
echo AUTH_CLIENT_SECRET="$AUTH_CLIENT_SECRET" >> local.properties
echo PUBLISHABLE_KEY="$PUBLISHABLE_KEY" >> local.properties
echo MIXPANEL_TOKEN="$MIXPANEL_TOKEN" >> local.properties
bundle exec fastlane playStore
shell: bash
5 changes: 3 additions & 2 deletions .github/workflows/deployStaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to Staging
on:
workflow_dispatch:
push:
branches: [ "master-disabled" ]
branches: [ "master" ]

jobs:
build:
Expand Down Expand Up @@ -44,12 +44,13 @@ jobs:
PUBLISHABLE_KEY: ${{ secrets.PUBLISHABLE_KEY }}
APP_ID: ${{ secrets.APP_ID }}
FIREBASEAPPDISTRO_CLI_TOKEN: ${{ secrets.FIREBASEAPPDISTRO_CLI_TOKEN }}
MIXPANEL_KEY: ${{ secrets.MIXPANEL_KEY }}
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}
run: |
touch local.properties
echo GMP_KEY="$GMP_KEY" >> local.properties
echo AUTH_CLIENT_ID="$AUTH_CLIENT_ID" >> local.properties
echo AUTH_CLIENT_SECRET="$AUTH_CLIENT_SECRET" >> local.properties
echo PUBLISHABLE_KEY="$PUBLISHABLE_KEY" >> local.properties
echo MIXPANEL_TOKEN="$MIXPANEL_TOKEN" >> local.properties
bundle exec fastlane firebase
shell: bash
2 changes: 1 addition & 1 deletion app/src/main/java/org/permanent/permanent/EventsManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.mixpanel.android.mpmetrics.MixpanelAPI
import org.json.JSONObject

class EventsManager(context: Context) {
private val mp: MixpanelAPI = MixpanelAPI.getInstance(context, BuildConfig.MIXPANEL_KEY, true)
private val mp: MixpanelAPI = MixpanelAPI.getInstance(context, BuildConfig.MIXPANEL_TOKEN, true)

fun sendToMixpanel(event: EventType, properties: JSONObject? = null) {
mp.track(event.value, properties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Observer
Expand All @@ -32,11 +33,17 @@ class SplashActivity : PermanentBaseActivity() {
private lateinit var viewModel: SplashViewModel

private val errorObserver = Observer<String> {
val snackBar = Snackbar.make(binding.root, it, Snackbar.LENGTH_LONG)
val view: View = snackBar.view
view.setBackgroundColor(ContextCompat.getColor(this, R.color.deepRed))
snackBar.setTextColor(ContextCompat.getColor(this, R.color.white))
snackBar.show()
prefsHelper.saveUserLoggedIn(false)
prefsHelper.saveDefaultArchiveId(0)
prefsHelper.saveBiometricsLogIn(true) // Setting back to default

startLoginActivity()

Toast.makeText(
this,
it,
Toast.LENGTH_SHORT
).show()
}

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down

0 comments on commit a4ce5bf

Please sign in to comment.